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  (  shape * args allow_scalar = True return_mode = False  )[source]

Parameters:
shapetuple

The shape which must be matched by the specified arguments.

argsndarray

The arguments which must match the specified shape.

allow_scalarbool

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

return_modebool

Whether to raise a ValueError or return a boolean if any argument does not have shape 'shape'.

Returns:
outbool | None

whether the arguments match the specified shape.

Raises:
ValueError

All specified arguments must match the specified shape.

API navigation