Skip to content

Commit

Permalink
Remove more numpy default integer types from RxD
Browse files Browse the repository at this point in the history
  • Loading branch information
kbvw committed Aug 21, 2024
1 parent 1865c69 commit 8c99ad8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions share/lib/python/neuron/rxd/rxd.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,8 +630,8 @@ def _matrix_to_rxd_sparse(m):
return (
n,
len(nonzero_i),
numpy.ascontiguousarray(nonzero_i, dtype=numpy.int_),
numpy.ascontiguousarray(nonzero_j, dtype=numpy.int_),
numpy.ascontiguousarray(nonzero_i, dtype=ctypes.c_long),
numpy.ascontiguousarray(nonzero_j, dtype=ctypes.c_long),
nonzero_values,
)

Expand Down
3 changes: 2 additions & 1 deletion test/rxd/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os.path as osp
import numpy
import ctypes
import pytest
import gc

Expand Down Expand Up @@ -81,7 +82,7 @@ def neuron_nosave_instance(neuron_import):
rxd.rxd.rxd_include_node_flux1D(0, None, None, None)
rxd.species._has_1d = False
rxd.species._has_3d = False
rxd.rxd._zero_volume_indices = numpy.ndarray(0, dtype=numpy.int_)
rxd.rxd._zero_volume_indices = numpy.ndarray(0, dtype=ctypes.c_long)
rxd.set_solve_type(dimension=1)


Expand Down

0 comments on commit 8c99ad8

Please sign in to comment.