MCPcopy Create free account
hub / github.com/bgrimstad/splinter / __transfer

Method __transfer

python/splinter/datatable.py:64–73  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

62
63 # Transfer samples to the library
64 def __transfer(self):
65 #print("Transferring " + str(self.__numSamples) + " samples to backend:")
66 #for i in range(self.__numSamples):
67 # print(str(self.__samples[i*(self.__xDim+1)]) + "," + str(self.__samples[i*(self.__xDim+1)+1]) + " = " + str(self.__samples[i*(self.__xDim+1)+2]))
68
69 if self.__num_samples > 0:
70 splinter._call(splinter._get_handle().splinter_datatable_add_samples_row_major, self.__handle, (c_double * len(self.__samples))(*self.__samples), self.__num_samples, self.__x_dim)
71
72 self.__samples = []
73 self.__num_samples = 0
74
75 # Getter for the datatable for use by BSpline
76 # Will make sure all samples are transferred to the back end before returning the handle to a BSpline

Callers 2

get_num_samplesMethod · 0.95
_get_handleMethod · 0.95

Calls 1

_get_handleMethod · 0.80

Tested by

no test coverage detected