We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16d6996 commit b81da1dCopy full SHA for b81da1d
numpy/_core/tests/test_array_coercion.py
@@ -762,6 +762,17 @@ def __getitem__(self):
762
with pytest.raises(error):
763
np.array(BadSequence())
764
765
+ def test_array_interface_descr_optional(self):
766
+ # The descr should be optional regresion test for gh-27249
767
+ arr = np.ones(10, dtype="V10")
768
+ iface = arr.__array_interface__
769
+ iface.pop("descr")
770
+
771
+ class MyClass:
772
+ __array_interface__ = iface
773
774
+ assert_array_equal(np.asarray(MyClass), arr)
775
776
777
class TestAsArray:
778
"""Test expected behaviors of ``asarray``."""
0 commit comments