finam.NoGrid#

class finam.NoGrid(dim=None, data_shape=None)[source]#

Bases: GridBase

Indicator for data without a spatial grid.

Parameters:
  • dim (int or None, optional) – Data dimensionality. Should match the length of data_shape.

  • data_shape (tuple of int or None, optional) – Data shape. Can contain -1 to indicate flexible axis.

Raises:

ValueError – If dim does not match the length of data_shape.

Attributes:
data_shape

tuple: Shape of the associated data.

dim

int: Dimension of the grid or data.

name

Grid name.

Methods

compatible_with(other[, check_location])

Check for compatibility with other Grid.

copy([deep])

Copy of this grid.

from_canonical(data)

Convert canonical data to grid specific form.

get_transform_to(other)

Transformation between compatible grids.

to_canonical(data)

Convert grid specific data to canonical form.

property dim#

Dimension of the grid or data.

Type:

int

property data_shape#

Shape of the associated data.

Type:

tuple

compatible_with(other, check_location=True)[source]#

Check for compatibility with other Grid.

Parameters:
  • other (instance of Grid) – Other grid to compatibility with.

  • check_location (bool, optional) – Whether to check location for equality, by default True

Returns:

compatibility

Return type:

bool

copy(deep=False)#

Copy of this grid.

Parameters:

deep (bool, optional) – If false, only a shallow copy is returned to save memory, by default False

Returns:

The grid copy.

Return type:

Grid

from_canonical(data)#

Convert canonical data to grid specific form.

get_transform_to(other)#

Transformation between compatible grids.

property name#

Grid name.

to_canonical(data)#

Convert grid specific data to canonical form.