Skip to content

Commit 87a571a

Browse files
committed
[Python] Fix species slicing error with Numpy 2.4.0 dev version (Cantera#2063)
1 parent e0a9fc4 commit 87a571a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

interfaces/cython/cantera/solutionbase.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ cdef class _SolutionBase:
395395
def __set__(self, species):
396396
if isinstance(species, (str, int)):
397397
species = (species,)
398-
self._selected_species.resize(len(species))
398+
self._selected_species = np.ndarray(len(species), dtype=np.uint64)
399399
for i,spec in enumerate(species):
400400
self._selected_species[i] = self.species_index(spec)
401401

0 commit comments

Comments
 (0)