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

Function _replace_zero_by_x_arrays

numpy/lib/shape_base.py:718–724  ·  view source on GitHub ↗
(sub_arys)

Source from the content-addressed store, hash-verified

716
717
718def _replace_zero_by_x_arrays(sub_arys):
719 for i in range(len(sub_arys)):
720 if _nx.ndim(sub_arys[i]) == 0:
721 sub_arys[i] = _nx.empty(0, dtype=sub_arys[i].dtype)
722 elif _nx.sometrue(_nx.equal(_nx.shape(sub_arys[i]), 0)):
723 sub_arys[i] = _nx.empty(0, dtype=sub_arys[i].dtype)
724 return sub_arys
725
726
727def _array_split_dispatcher(ary, indices_or_sections, axis=None):

Callers

nothing calls this directly

Calls 2

ndimMethod · 0.80
shapeMethod · 0.45

Tested by

no test coverage detected