Skip to content

Commit

Permalink
llvm: Use np.asarray instead of asfarray if dtype is provided
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Vesely <[email protected]>
  • Loading branch information
jvesely committed Jan 9, 2025
1 parent d00a524 commit c9fcf7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions psyneulink/core/llvm/execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def _state_struct(self):
return self._get_compilation_param('_state', '_get_state_initializer', 1)

def execute(self, variable):
new_variable = np.asfarray(variable, dtype=self._bin_func.np_arg_dtypes[2].base)
new_variable = np.asarray(variable, dtype=self._bin_func.np_arg_dtypes[2].base)
data_in = new_variable.reshape(self._bin_func.np_arg_dtypes[2].shape)

data_out = self._bin_func.np_buffer_for_arg(3)
Expand All @@ -273,7 +273,7 @@ def execute(self, variable):

def cuda_execute(self, variable):
# Create input argument, PyCUDA doesn't care about shape
data_in = np.asfarray(variable, dtype=self._bin_func.np_arg_dtypes[2].base)
data_in = np.asarray(variable, dtype=self._bin_func.np_arg_dtypes[2].base)
data_out = self._bin_func.np_buffer_for_arg(3)

self._bin_func.cuda_call(self._cuda_param_struct,
Expand Down

0 comments on commit c9fcf7a

Please sign in to comment.