{ } Raw JSON

bundles / astropy latest / astropy / utils / shapes / check_broadcast

function

astropy.utils.shapes:check_broadcast

source: /astropy/utils/shapes.py :357

Signature

def   check_broadcast ( * shapes : tuple[int, ...] )  →  tuple[int, ...]

Summary

Extended Summary

Determines whether two or more Numpy arrays can be broadcast with each other based on their shape tuple alone.

Parameters

*shapes : tuple

All shapes to include in the comparison. If only one shape is given it is passed through unmodified. If no shapes are given returns an empty tuple.

Returns

broadcast : `tuple`

If all shapes are mutually broadcastable, returns a tuple of the full broadcast shape.

Aliases

  • astropy.utils.check_broadcast