Logo

A physics toolbox for laser spectroscopy.

Static Badge Static Badge Static Badge

Static Badge Static Badge

© 2025 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_scalarNone

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

return_modeNone

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

Returns:
outOptional[bool]

whether the arguments match the specified shape.

Raises:
ValueError

All specified arguments must match the specified shape.

API navigation