Did I find the right examples for you? yes no

All Samples(4)  |  Call(0)  |  Derive(0)  |  Import(4)

src/p/y/pymbar-2.0.1-beta/src/pymbar/pymbar.py   pymbar(Download)
      # Test whether we can import the helper code.
      try:
        import _pymbar # import the helper code
        self.use_embedded_helper_code = True # if we have succeeded, use it
        if verbose: print "Using embedded C++ helper code."
    if (self.use_embedded_helper_code):	      
      # Use embedded C++ optimizations.
      import _pymbar
      u_kn = numpy.array(u_kn, dtype=numpy.float64) # necessary for helper code to interpret type of u_kn
      log_w_kn = _pymbar.computeUnnormalizedLogWeightsCpp(self.K, self.N_max, self.K_nonzero, self.nonzero_N_k_indices, self.N_k, self.f_k, self.u_kln, u_kn);

src/p/y/pymbar-HEAD/pymbar/pymbar.py   pymbar(Download)
      # Test whether we can import the helper code.
      try:
        import _pymbar # import the helper code
        self.use_embedded_helper_code = True # if we have succeeded, use it
        if verbose: print "Using embedded C++ helper code."
    if (self.use_embedded_helper_code):	
      # Use embedded C++ optimizations.
      import _pymbar
      u_kn = numpy.array(u_kn, dtype=numpy.float64) # necessary for helper code to interpret type of u_kn
      log_w_kn = _pymbar.computeUnnormalizedLogWeightsCpp(self.K, self.N_max, len(self.nonzero_N_k_indices), self.nonzero_N_k_indices, self.N_k, self.f_k, self.u_kln, u_kn);