MCPcopy Index your code
hub / github.com/dask/dask / _axis_fmt

Function _axis_fmt

dask/array/creation.py:698–705  ·  view source on GitHub ↗
(axis, name, ndim)

Source from the content-addressed store, hash-verified

696 raise ValueError("diag requires an array of at least two dimensions")
697
698 def _axis_fmt(axis, name, ndim):
699 if axis < 0:
700 t = ndim + axis
701 if t < 0:
702 msg = "{}: axis {} is out of bounds for array of dimension {}"
703 raise AxisError(msg.format(name, axis, ndim))
704 axis = t
705 return axis
706
707 def pop_axes(chunks, axis1, axis2):
708 chunks = list(chunks)

Callers 1

diagonalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…