Skip to content

Commit

Permalink
Avoid direct call to ndarray constructor: it is not a numpy coding co…
Browse files Browse the repository at this point in the history
…nvension
  • Loading branch information
yungyuc committed Jan 1, 2025
1 parent 1783b0a commit ea79063
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,12 +438,12 @@ def test_SimpleArray_from_ndarray(self):
self.assertFalse(sarr_from_cpp.is_from_python)

shape = (2, 3, 5, 7)
np_sarr = np.ndarray(shape=shape, dtype='float64')
np_sarr = np.empty(shape, dtype='float64')
py_sarr = modmesh.SimpleArrayFloat64(array=np_sarr)
self.assertTupleEqual(shape, py_sarr.shape)

shape = (5, 5, 5, 5)
np_sarr = np.ndarray(shape=shape, dtype='float64')
np_sarr = np.empty(shape, dtype='float64')
for i in range(5):
for j in range(5):
for k in range(5):
Expand Down

0 comments on commit ea79063

Please sign in to comment.