4.6.3 pde.tools.cuboid module
An n-dimensional, axes-aligned cuboid.
This module defines the Cuboid
class, which represents an n-dimensional
cuboid that is aligned with the axes of a Cartesian coordinate system.
- class Cuboid(pos, size, mutable=True)[source]
Bases:
object
Class that represents a cuboid in \(n\) dimensions.
Defines a cuboid from a position and a size vector.
- Parameters:
- property centroid
- property corners: tuple[ndarray, ndarray]
Return coordinates of two extreme corners defining the cuboid.
- asanyarray_flags(data, dtype=None, writeable=True)[source]
Turns data into an array and sets the respective flags.
A copy is only made if necessary
- Parameters:
data (
ndarray
) – numpy array that whose flags are adjusteddtype (dtype[Any] | None | type[Any] | _SupportsDType[dtype[Any]] | str | tuple[Any, int] | tuple[Any, SupportsIndex | Sequence[SupportsIndex]] | list[Any] | _DTypeDict | tuple[Any, Any]) – the resulant dtype
writeable (bool) – Flag determining whether the results is writable
- Returns:
array with same data as data but with flags adjusted.
- Return type: