Skip to content

Commit d74cc92

Browse files
committed
Fix a doctest for numpy 2.0
1 parent 34e41e1 commit d74cc92

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

blosc2/ndarray.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -527,13 +527,13 @@ def fields(self):
527527
Examples
528528
--------
529529
>>> import blosc2
530+
>>> import numpy as np
530531
>>> shape = (10,)
531532
>>> dtype = np.dtype([('a', np.int32), ('b', np.float64)])
532533
>>> # Create a structured array
533534
>>> sa = blosc2.zeros(shape, dtype=dtype)
534-
>>> # Evaluate if the fields are equal
535-
>>> np.all((sa.fields['a'] == sa.fields['b'])[:])
536-
True
535+
>>> # Check that fields are equal
536+
>>> assert sa.fields['a'] == sa.fields['b']
537537
538538
"""
539539
return self._fields

0 commit comments

Comments
 (0)