dask 2021.10.0

Parameters
astype(self, dtype, **kwargs)

Parameters

dtype : str or dtype

Typecode or data-type to which the array is cast.

casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional

Controls what kind of data casting may occur. Defaults to 'unsafe' for backwards compatibility.

  • 'no' means the data types should not be cast at all.

  • 'equiv' means only byte-order changes are allowed.

  • 'safe' means only casts which can preserve values are allowed.

  • 'same_kind' means only safe casts or casts within a kind,

    like float64 to float32, are allowed.

  • 'unsafe' means any data conversions may be done.

copy : bool, optional

By default, astype always returns a newly allocated array. If this is set to False and the :None:None:`dtype` requirement is satisfied, the input array is returned instead of a copy.

Copy of the array, cast to a specified type.

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: /dask/array/core.py#2030
type: <class 'function'>
Commit: