MCPcopy Create free account
hub / github.com/numpy/numpy / _ragged_creation

Method _ragged_creation

numpy/core/tests/test_multiarray.py:1137–1142  ·  view source on GitHub ↗
(self, seq)

Source from the content-addressed store, hash-verified

1135 shape=(max_bytes//itemsize + 1,), dtype=dtype)
1136
1137 def _ragged_creation(self, seq):
1138 # without dtype=object, the ragged object raises
1139 with pytest.raises(ValueError, match=".*detected shape was"):
1140 a = np.array(seq)
1141
1142 return np.array(seq, dtype=object)
1143
1144 def test_ragged_ndim_object(self):
1145 # Lists of mismatching depths are treated as object arrays

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected