astropy 5.0

The class proper is assumed to have some underlying data, which are arrays or array-like structures. It must define a shape property, which gives the shape of those data, as well as an _apply method that creates a new instance in which a ndarray method has been applied to those.

Furthermore, for consistency with ndarray , it is recommended to define a setter for the shape property, which, like the :None:None:`~numpy.ndarray.shape` property allows in-place reshaping the internal data (and, unlike the reshape method raises an exception if this is not possible).

This class only provides the shape-changing methods and is meant in particular for ndarray subclasses that need to keep track of other arrays. For other classes, ~astropy.utils.shapes.ShapedLikeNDArray is recommended.

Mixin class to provide shape-changing methods.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /astropy/utils/shapes.py#13
type: <class 'type'>
Commit: