Skip to contents

A data type object (an instance of Dtype class) describes how the bytes in the fixed-size block of memory corresponding to an array item should be interpreted.

Details

The Zarr Dtype class.

References

https://numpy.org/doc/stable/reference/arrays.dtypes.html

Public fields

dtype

The original dtype string, like "<f4".

byte_order

The byte order of the dtype, either "little", "big", or "nr".

basic_type

The basic type of the dtype, like "f".

num_bytes

The number of bytes of the dtype.

num_items

The number of items of the dtype.

is_signed

Whether the dtype is signed. Logical/boolean.

is_structured

Whether the dtype is structured. Logical/boolean.

is_object

Whether the dtype is an object. Logical/boolean.

object_codec

The object codec instance.

Methods


Method new()

Create a new Dtype instance.

Usage

Dtype$new(dtype, object_codec = NA)

Arguments

dtype

The original dtype string, like "<f4".

object_codec

The object codec instance.

Returns

A Dtype instance.


Method get_asrtype()

Get as R type

Usage

Dtype$get_asrtype()


Method get_rtype()

basic type R type

Usage

Dtype$get_rtype()


Method get_typed_array_ctr()

get typed array

Usage

Dtype$get_typed_array_ctr()


Method clone()

The objects of this class are cloneable with this method.

Usage

Dtype$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.