bolt/utils.py
def inshape(shape, axes):
    """
    Checks to see if a list of axes are contained within an array shape.

    Parameters
    ----------
    shape : tuple[int]
        the shape of a BoltArray

    axes : tuple[int]
        the axes to check against shape
    """
    valid = all([(axis < len(shape)) and (axis >= 0) for axis in axes])
    if not valid:
        raise ValueError("axes not valid for an ndarray of shape: %s" % str(shape))
def inshape(shape, axes):
    valid = all([(axis < len(shape)) and (axis >= 0) for axis in axes])
    if not valid:
        raise ValueError("axes not valid for an ndarray of shape: %s" % str(shape))
def inshape ( shape , axes ) : valid = all ( [ ( axis < len ( shape ) ) and ( axis >= 0 ) for axis in axes ] ) if not valid : raise ValueError ( "axes not valid for an ndarray of shape: %s" % str ( shape ) )
Checks to see if a list of axes are contained within an array shape.

    Parameters
    ----------
    shape : tuple[int]
        the shape of a BoltArray

    axes : tuple[int]
        the axes to check against shape
Checks to see if a list of axes are contained within an array shape .