qspec logo qspec logo

A physics toolbox for laser spectroscopy.

Static Badge Static Badge Static Badge

Static Badge Static Badge

© 2026 Patrick Müller. All rights reserved.

qspec. check_shape_like  (  *args ,  allow_scalar=True  )[source]

Check whether the shapes of all arguments can be broadcast together.

Parameters:
argsndarray

The arguments which must have shapes that can be broadcast together.

allow_scalarbool

Whether scalar values (shape == ()) are seen as compatible with arbitrary shapes.

Raises:
ValueError

If the shapes of the arguments cannot be broadcast together.