MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / ArraySubclass

Class ArraySubclass

lib/matplotlib/tests/test_cbook.py:870–877  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

868 # isinstance(x, collections.abc.Iterable).
869
870 class ArraySubclass(np.ndarray):
871
872 def __iter__(self):
873 for value in super().__iter__():
874 yield np.array(value)
875
876 def __getitem__(self, item):
877 return np.array(super().__getitem__(item))
878
879 v = np.arange(10, dtype=float)
880 x = ArraySubclass((10,), dtype=float, buffer=v.data)

Callers 1

test_reshape2dFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_reshape2dFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…