array

photonforge.typing.array(dtype, ndims, ndims_max=None)[source]

Type for arrays with specified number of dimensions.

Parameters:
  • dtype (object) – Scalar type for the array elements.

  • ndims (int) – Number of dimensions for the array.

  • ndims_max (int | None) – If set, maximal number of dimensions for the array. Any dimensions between ndims and ndims_max (inclusive) are valid.

Returns:

Array type.

Return type:

object