Skip to content

Commit

Permalink
Explicilty cast chunk_shape to int32 to fix numpy 2 int promotion cha…
Browse files Browse the repository at this point in the history
…nges
  • Loading branch information
kburns committed Aug 16, 2024
1 parent 4735501 commit 02cdaec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dedalus/core/transposes.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ cdef class FFTWTranspose:
cdef readonly int datasize, axis
cdef readonly int N0, N1, N2, N3
cdef readonly int[::1] global_shape
cdef readonly int[::1] chunk_shape
cdef readonly int[::1] col_starts
cdef readonly int[::1] row_starts
cdef readonly int[::1] col_ends
Expand All @@ -60,6 +61,7 @@ cdef class FFTWTranspose:
logger.debug("Building FFTW transpose plan for (dtype, gshape, axis) = (%s, %s, %s)" %(dtype, global_shape, axis))
# Attributes
self.global_shape = global_shape = np.array(global_shape, dtype=np.int32)
self.chunk_shape = chunk_shape = np.array(chunk_shape, dtype=np.int32)
self.datasize = {np.float64: 1, np.complex128: 2}[np.dtype(dtype).type]
self.axis = axis
self.pycomm = pycomm
Expand Down

0 comments on commit 02cdaec

Please sign in to comment.