arkouda.numpy.dtypes

Classes

ARKOUDA_SUPPORTED_DTYPES

frozenset() -> empty frozenset object

ARKOUDA_SUPPORTED_FLOATS

Built-in immutable sequence.

ARKOUDA_SUPPORTED_INTS

Built-in immutable sequence.

ARKOUDA_SUPPORTED_NUMBERS

Built-in immutable sequence.

DType

An enumeration.

DTypeObjects

frozenset() -> empty frozenset object

DTypes

frozenset() -> empty frozenset object

Enum

Generic enumeration.

NUMBER_FORMAT_STRINGS

dict() -> new empty dictionary

NumericDTypes

frozenset() -> empty frozenset object

ScalarDTypes

frozenset() -> empty frozenset object

SeriesDTypes

dict() -> new empty dictionary

Union

Union type; Union[X, Y] means either X or Y.

all_scalars

The central part of internal API.

annotations

bigint

bitType

Unsigned integer type, compatible with C unsigned long.

bool_

Boolean type (True or False), stored as a byte.

bool_scalars

The central part of internal API.

complex128

Complex number type composed of two double-precision floating-point

complex64

Complex number type composed of two single-precision floating-point

float16

Half-precision floating-point number type.

float32

Single-precision floating-point number type, compatible with C float.

float64

Double-precision floating-point number type, compatible with Python float

float_scalars

The central part of internal API.

int16

Signed integer type, compatible with C short.

int32

Signed integer type, compatible with C int.

int64

Signed integer type, compatible with Python int and C long.

int8

Signed integer type, compatible with C char.

intTypes

frozenset() -> empty frozenset object

int_scalars

The central part of internal API.

numeric_and_bool_scalars

The central part of internal API.

numeric_scalars

The central part of internal API.

numpy_scalars

The central part of internal API.

str_

A unicode string.

str_scalars

The central part of internal API.

uint16

Unsigned integer type, compatible with C unsigned short.

uint32

Unsigned integer type, compatible with C unsigned int.

uint64

Unsigned integer type, compatible with C unsigned long.

uint8

Unsigned integer type, compatible with C unsigned char.

Functions

cast(typ, val)

Cast a value to a type.

dtype(x)

get_byteorder(→ str)

Get a concrete byteorder (turns '=' into '<' or '>')

get_server_byteorder(→ str)

Get the server's byteorder

isSupportedFloat(num)

isSupportedInt(num)

isSupportedNumber(num)

resolve_scalar_dtype(→ str)

Try to infer what dtype arkouda_server should treat val as.

Module Contents

class arkouda.numpy.dtypes.ARKOUDA_SUPPORTED_DTYPES

frozenset() -> empty frozenset object frozenset(iterable) -> frozenset object

Build an immutable unordered collection of unique elements.

copy(*args, **kwargs)

Return a shallow copy of a set.

difference(*args, **kwargs)

Return the difference of two or more sets as a new set.

(i.e. all elements that are in this set but not the others.)

intersection(*args, **kwargs)

Return the intersection of two sets as a new set.

(i.e. all elements that are in both sets.)

isdisjoint(*args, **kwargs)

Return True if two sets have a null intersection.

issubset(*args, **kwargs)

Report whether another set contains this set.

issuperset(*args, **kwargs)

Report whether this set contains another set.

symmetric_difference(*args, **kwargs)

Return the symmetric difference of two sets as a new set.

(i.e. all elements that are in exactly one of the sets.)

union(*args, **kwargs)

Return the union of sets as a new set.

(i.e. all elements that are in either set.)

class arkouda.numpy.dtypes.ARKOUDA_SUPPORTED_FLOATS

Built-in immutable sequence.

If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable’s items.

If the argument is a tuple, the return value is the same object.

count(value, /)

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

class arkouda.numpy.dtypes.ARKOUDA_SUPPORTED_INTS

Built-in immutable sequence.

If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable’s items.

If the argument is a tuple, the return value is the same object.

count(value, /)

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

class arkouda.numpy.dtypes.ARKOUDA_SUPPORTED_NUMBERS

Built-in immutable sequence.

If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable’s items.

If the argument is a tuple, the return value is the same object.

count(value, /)

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

class arkouda.numpy.dtypes.DType[source]

An enumeration.

BIGINT(*args, **kwargs)

An enumeration.

BOOL(*args, **kwargs)

An enumeration.

COMPLEX128(*args, **kwargs)

An enumeration.

COMPLEX64(*args, **kwargs)

An enumeration.

FLOAT(*args, **kwargs)

An enumeration.

FLOAT32(*args, **kwargs)

An enumeration.

FLOAT64(*args, **kwargs)

An enumeration.

INT(*args, **kwargs)

An enumeration.

INT16(*args, **kwargs)

An enumeration.

INT32(*args, **kwargs)

An enumeration.

INT64(*args, **kwargs)

An enumeration.

INT8(*args, **kwargs)

An enumeration.

STR(*args, **kwargs)

An enumeration.

UINT(*args, **kwargs)

An enumeration.

UINT16(*args, **kwargs)

An enumeration.

UINT32(*args, **kwargs)

An enumeration.

UINT64(*args, **kwargs)

An enumeration.

UINT8(*args, **kwargs)

An enumeration.

name(*args, **kwargs)

The name of the Enum member.

value(*args, **kwargs)

The value of the Enum member.

class arkouda.numpy.dtypes.DTypeObjects

frozenset() -> empty frozenset object frozenset(iterable) -> frozenset object

Build an immutable unordered collection of unique elements.

copy(*args, **kwargs)

Return a shallow copy of a set.

difference(*args, **kwargs)

Return the difference of two or more sets as a new set.

(i.e. all elements that are in this set but not the others.)

intersection(*args, **kwargs)

Return the intersection of two sets as a new set.

(i.e. all elements that are in both sets.)

isdisjoint(*args, **kwargs)

Return True if two sets have a null intersection.

issubset(*args, **kwargs)

Report whether another set contains this set.

issuperset(*args, **kwargs)

Report whether this set contains another set.

symmetric_difference(*args, **kwargs)

Return the symmetric difference of two sets as a new set.

(i.e. all elements that are in exactly one of the sets.)

union(*args, **kwargs)

Return the union of sets as a new set.

(i.e. all elements that are in either set.)

class arkouda.numpy.dtypes.DTypes

frozenset() -> empty frozenset object frozenset(iterable) -> frozenset object

Build an immutable unordered collection of unique elements.

copy(*args, **kwargs)

Return a shallow copy of a set.

difference(*args, **kwargs)

Return the difference of two or more sets as a new set.

(i.e. all elements that are in this set but not the others.)

intersection(*args, **kwargs)

Return the intersection of two sets as a new set.

(i.e. all elements that are in both sets.)

isdisjoint(*args, **kwargs)

Return True if two sets have a null intersection.

issubset(*args, **kwargs)

Report whether another set contains this set.

issuperset(*args, **kwargs)

Report whether this set contains another set.

symmetric_difference(*args, **kwargs)

Return the symmetric difference of two sets as a new set.

(i.e. all elements that are in exactly one of the sets.)

union(*args, **kwargs)

Return the union of sets as a new set.

(i.e. all elements that are in either set.)

class arkouda.numpy.dtypes.Enum

Generic enumeration.

Derive from this class to define new enumerations.

class arkouda.numpy.dtypes.NUMBER_FORMAT_STRINGS

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

clear(*args, **kwargs)

D.clear() -> None. Remove all items from D.

copy(*args, **kwargs)

D.copy() -> a shallow copy of D

fromkeys(iterable, value=None, /)

Create a new dictionary with keys from iterable and values set to value.

get(key, default=None, /)

Return the value for key if key is in the dictionary, else default.

items(*args, **kwargs)

D.items() -> a set-like object providing a view on D’s items

keys(*args, **kwargs)

D.keys() -> a set-like object providing a view on D’s keys

pop(*args, **kwargs)

D.pop(k[,d]) -> v, remove specified key and return the corresponding value.

If key is not found, default is returned if given, otherwise KeyError is raised

popitem()

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

setdefault(key, default=None, /)

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

update(*args, **kwargs)

D.update([E, ]**F) -> None. Update D from dict/iterable E and F. If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values(*args, **kwargs)

D.values() -> an object providing a view on D’s values

class arkouda.numpy.dtypes.NumericDTypes

frozenset() -> empty frozenset object frozenset(iterable) -> frozenset object

Build an immutable unordered collection of unique elements.

copy(*args, **kwargs)

Return a shallow copy of a set.

difference(*args, **kwargs)

Return the difference of two or more sets as a new set.

(i.e. all elements that are in this set but not the others.)

intersection(*args, **kwargs)

Return the intersection of two sets as a new set.

(i.e. all elements that are in both sets.)

isdisjoint(*args, **kwargs)

Return True if two sets have a null intersection.

issubset(*args, **kwargs)

Report whether another set contains this set.

issuperset(*args, **kwargs)

Report whether this set contains another set.

symmetric_difference(*args, **kwargs)

Return the symmetric difference of two sets as a new set.

(i.e. all elements that are in exactly one of the sets.)

union(*args, **kwargs)

Return the union of sets as a new set.

(i.e. all elements that are in either set.)

class arkouda.numpy.dtypes.ScalarDTypes

frozenset() -> empty frozenset object frozenset(iterable) -> frozenset object

Build an immutable unordered collection of unique elements.

copy(*args, **kwargs)

Return a shallow copy of a set.

difference(*args, **kwargs)

Return the difference of two or more sets as a new set.

(i.e. all elements that are in this set but not the others.)

intersection(*args, **kwargs)

Return the intersection of two sets as a new set.

(i.e. all elements that are in both sets.)

isdisjoint(*args, **kwargs)

Return True if two sets have a null intersection.

issubset(*args, **kwargs)

Report whether another set contains this set.

issuperset(*args, **kwargs)

Report whether this set contains another set.

symmetric_difference(*args, **kwargs)

Return the symmetric difference of two sets as a new set.

(i.e. all elements that are in exactly one of the sets.)

union(*args, **kwargs)

Return the union of sets as a new set.

(i.e. all elements that are in either set.)

class arkouda.numpy.dtypes.SeriesDTypes

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

clear(*args, **kwargs)

D.clear() -> None. Remove all items from D.

copy(*args, **kwargs)

D.copy() -> a shallow copy of D

fromkeys(iterable, value=None, /)

Create a new dictionary with keys from iterable and values set to value.

get(key, default=None, /)

Return the value for key if key is in the dictionary, else default.

items(*args, **kwargs)

D.items() -> a set-like object providing a view on D’s items

keys(*args, **kwargs)

D.keys() -> a set-like object providing a view on D’s keys

pop(*args, **kwargs)

D.pop(k[,d]) -> v, remove specified key and return the corresponding value.

If key is not found, default is returned if given, otherwise KeyError is raised

popitem()

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

setdefault(key, default=None, /)

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

update(*args, **kwargs)

D.update([E, ]**F) -> None. Update D from dict/iterable E and F. If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values(*args, **kwargs)

D.values() -> an object providing a view on D’s values

class arkouda.numpy.dtypes.Union

Bases: _Final

Union type; Union[X, Y] means either X or Y.

To define a union, use e.g. Union[int, str]. Details: - The arguments must be types and there must be at least one. - None as an argument is a special case and is replaced by

type(None).

  • Unions of unions are flattened, e.g.:

    Union[Union[int, str], float] == Union[int, str, float]
    
  • Unions of a single argument vanish, e.g.:

    Union[int] == int  # The constructor actually returns int
    
  • Redundant arguments are skipped, e.g.:

    Union[int, str, int] == Union[int, str]
    
  • When comparing unions, the argument order is ignored, e.g.:

    Union[int, str] == Union[str, int]
    
  • You cannot subclass or instantiate a union.

  • You can use Optional[X] as a shorthand for Union[X, None].

class arkouda.numpy.dtypes.all_scalars(origin, params, *, inst=True, name=None)

Bases: _GenericAlias

The central part of internal API.

This represents a generic version of type ‘origin’ with type arguments ‘params’. There are two kind of these aliases: user defined and special. The special ones are wrappers around builtin collections and ABCs in collections.abc. These must have ‘name’ always set. If ‘inst’ is False, then the alias can’t be instantiated, this is used by e.g. typing.List and typing.Dict.

class arkouda.numpy.dtypes.annotations
compiler_flag(*args, **kwargs)

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

getMandatoryRelease()

Return release in which this feature will become mandatory.

This is a 5-tuple, of the same form as sys.version_info, or, if the feature was dropped, is None.

getOptionalRelease()

Return first release in which this feature was recognized.

This is a 5-tuple, of the same form as sys.version_info.

mandatory(*args, **kwargs)

Built-in immutable sequence.

If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable’s items.

If the argument is a tuple, the return value is the same object.

optional(*args, **kwargs)

Built-in immutable sequence.

If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable’s items.

If the argument is a tuple, the return value is the same object.

class arkouda.numpy.dtypes.bigint[source]
itemsize(*args, **kwargs)

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

name(*args, **kwargs)

str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.

ndim(*args, **kwargs)

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

shape(*args, **kwargs)

Built-in immutable sequence.

If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable’s items.

If the argument is a tuple, the return value is the same object.

type(x)[source]
class arkouda.numpy.dtypes.bitType(value)

Bases: numpy.unsignedinteger

Unsigned integer type, compatible with C unsigned long.

Character code:

'L'

Canonical name:

numpy.uint

Alias on this platform (Linux x86_64):

numpy.uint64: 64-bit unsigned integer (0 to 18_446_744_073_709_551_615).

Alias on this platform (Linux x86_64):

numpy.uintp: Unsigned integer large enough to fit pointer, compatible with C uintptr_t.

bit_count(*args, **kwargs)

uint64.bit_count() -> int

Computes the number of 1-bits in the absolute value of the input. Analogous to the builtin int.bit_count or popcount in C++.

>>> np.uint64(127).bit_count()
7
class arkouda.numpy.dtypes.bool_(value)

Bases: numpy.generic

Boolean type (True or False), stored as a byte.

Warning

The bool_ type is not a subclass of the int_ type (the bool_ is not even a number type). This is different than Python’s default implementation of bool as a sub-class of int.

Character code:

'?'

class arkouda.numpy.dtypes.bool_scalars(origin, params, *, inst=True, name=None)

Bases: _GenericAlias

The central part of internal API.

This represents a generic version of type ‘origin’ with type arguments ‘params’. There are two kind of these aliases: user defined and special. The special ones are wrappers around builtin collections and ABCs in collections.abc. These must have ‘name’ always set. If ‘inst’ is False, then the alias can’t be instantiated, this is used by e.g. typing.List and typing.Dict.

arkouda.numpy.dtypes.cast(typ, val)

Cast a value to a type.

This returns the value unchanged. To the type checker this signals that the return value has the designated type, but at runtime we intentionally don’t check anything (we want this to be as fast as possible).

class arkouda.numpy.dtypes.complex128(value)

Bases: numpy.complexfloating

Complex number type composed of two double-precision floating-point

numbers, compatible with Python complex.

Character code:

'D'

Canonical name:

numpy.cdouble

Alias:

numpy.cfloat

Alias:

numpy.complex_

Alias on this platform (Linux x86_64):

numpy.complex128: Complex number type composed of 2 64-bit-precision floating-point numbers.

class arkouda.numpy.dtypes.complex64(value)

Bases: numpy.complexfloating

Complex number type composed of two single-precision floating-point

numbers.

Character code:

'F'

Canonical name:

numpy.csingle

Alias:

numpy.singlecomplex

Alias on this platform (Linux x86_64):

numpy.complex64: Complex number type composed of 2 32-bit-precision floating-point numbers.

arkouda.numpy.dtypes.dtype(x)[source]
class arkouda.numpy.dtypes.float16(value)

Bases: numpy.floating

Half-precision floating-point number type.

Character code:

'e'

Canonical name:

numpy.half

Alias on this platform (Linux x86_64):

numpy.float16: 16-bit-precision floating-point number type: sign bit, 5 bits exponent, 10 bits mantissa.

as_integer_ratio(*args, **kwargs)

half.as_integer_ratio() -> (int, int)

Return a pair of integers, whose ratio is exactly equal to the original floating point number, and with a positive denominator. Raise OverflowError on infinities and a ValueError on NaNs.

>>> np.half(10.0).as_integer_ratio()
(10, 1)
>>> np.half(0.0).as_integer_ratio()
(0, 1)
>>> np.half(-.25).as_integer_ratio()
(-1, 4)
is_integer(*args, **kwargs)

half.is_integer() -> bool

Return True if the floating point number is finite with integral value, and False otherwise.

Added in version 1.22.

>>> np.half(-2.0).is_integer()
True
>>> np.half(3.2).is_integer()
False
class arkouda.numpy.dtypes.float32(value)

Bases: numpy.floating

Single-precision floating-point number type, compatible with C float.

Character code:

'f'

Canonical name:

numpy.single

Alias on this platform (Linux x86_64):

numpy.float32: 32-bit-precision floating-point number type: sign bit, 8 bits exponent, 23 bits mantissa.

as_integer_ratio(*args, **kwargs)

single.as_integer_ratio() -> (int, int)

Return a pair of integers, whose ratio is exactly equal to the original floating point number, and with a positive denominator. Raise OverflowError on infinities and a ValueError on NaNs.

>>> np.single(10.0).as_integer_ratio()
(10, 1)
>>> np.single(0.0).as_integer_ratio()
(0, 1)
>>> np.single(-.25).as_integer_ratio()
(-1, 4)
is_integer(*args, **kwargs)

single.is_integer() -> bool

Return True if the floating point number is finite with integral value, and False otherwise.

Added in version 1.22.

>>> np.single(-2.0).is_integer()
True
>>> np.single(3.2).is_integer()
False
class arkouda.numpy.dtypes.float64(value)

Bases: numpy.floating

Double-precision floating-point number type, compatible with Python float

and C double.

Character code:

'd'

Canonical name:

numpy.double

Alias:

numpy.float_

Alias on this platform (Linux x86_64):

numpy.float64: 64-bit precision floating-point number type: sign bit, 11 bits exponent, 52 bits mantissa.

as_integer_ratio(*args, **kwargs)

double.as_integer_ratio() -> (int, int)

Return a pair of integers, whose ratio is exactly equal to the original floating point number, and with a positive denominator. Raise OverflowError on infinities and a ValueError on NaNs.

>>> np.double(10.0).as_integer_ratio()
(10, 1)
>>> np.double(0.0).as_integer_ratio()
(0, 1)
>>> np.double(-.25).as_integer_ratio()
(-1, 4)
fromhex(string, /)

Create a floating-point number from a hexadecimal string.

>>> float.fromhex('0x1.ffffp10')
2047.984375
>>> float.fromhex('-0x1p-1074')
-5e-324
hex(/)

Return a hexadecimal representation of a floating-point number.

>>> (-0.1).hex()
'-0x1.999999999999ap-4'
>>> 3.14159.hex()
'0x1.921f9f01b866ep+1'
is_integer(*args, **kwargs)

double.is_integer() -> bool

Return True if the floating point number is finite with integral value, and False otherwise.

Added in version 1.22.

>>> np.double(-2.0).is_integer()
True
>>> np.double(3.2).is_integer()
False
class arkouda.numpy.dtypes.float_scalars(origin, params, *, inst=True, name=None)

Bases: _GenericAlias

The central part of internal API.

This represents a generic version of type ‘origin’ with type arguments ‘params’. There are two kind of these aliases: user defined and special. The special ones are wrappers around builtin collections and ABCs in collections.abc. These must have ‘name’ always set. If ‘inst’ is False, then the alias can’t be instantiated, this is used by e.g. typing.List and typing.Dict.

arkouda.numpy.dtypes.get_byteorder(dt: np.dtype) str[source]

Get a concrete byteorder (turns ‘=’ into ‘<’ or ‘>’)

arkouda.numpy.dtypes.get_server_byteorder() str[source]

Get the server’s byteorder

class arkouda.numpy.dtypes.int16(value)

Bases: numpy.signedinteger

Signed integer type, compatible with C short.

Character code:

'h'

Canonical name:

numpy.short

Alias on this platform (Linux x86_64):

numpy.int16: 16-bit signed integer (-32_768 to 32_767).

bit_count(*args, **kwargs)

int16.bit_count() -> int

Computes the number of 1-bits in the absolute value of the input. Analogous to the builtin int.bit_count or popcount in C++.

>>> np.int16(127).bit_count()
7
>>> np.int16(-127).bit_count()
7
class arkouda.numpy.dtypes.int32(value)

Bases: numpy.signedinteger

Signed integer type, compatible with C int.

Character code:

'i'

Canonical name:

numpy.intc

Alias on this platform (Linux x86_64):

numpy.int32: 32-bit signed integer (-2_147_483_648 to 2_147_483_647).

bit_count(*args, **kwargs)

int32.bit_count() -> int

Computes the number of 1-bits in the absolute value of the input. Analogous to the builtin int.bit_count or popcount in C++.

>>> np.int32(127).bit_count()
7
>>> np.int32(-127).bit_count()
7
class arkouda.numpy.dtypes.int64(value)

Bases: numpy.signedinteger

Signed integer type, compatible with Python int and C long.

Character code:

'l'

Canonical name:

numpy.int_

Alias on this platform (Linux x86_64):

numpy.int64: 64-bit signed integer (-9_223_372_036_854_775_808 to 9_223_372_036_854_775_807).

Alias on this platform (Linux x86_64):

numpy.intp: Signed integer large enough to fit pointer, compatible with C intptr_t.

bit_count(*args, **kwargs)

int64.bit_count() -> int

Computes the number of 1-bits in the absolute value of the input. Analogous to the builtin int.bit_count or popcount in C++.

>>> np.int64(127).bit_count()
7
>>> np.int64(-127).bit_count()
7
class arkouda.numpy.dtypes.int8(value)

Bases: numpy.signedinteger

Signed integer type, compatible with C char.

Character code:

'b'

Canonical name:

numpy.byte

Alias on this platform (Linux x86_64):

numpy.int8: 8-bit signed integer (-128 to 127).

bit_count(*args, **kwargs)

int8.bit_count() -> int

Computes the number of 1-bits in the absolute value of the input. Analogous to the builtin int.bit_count or popcount in C++.

>>> np.int8(127).bit_count()
7
>>> np.int8(-127).bit_count()
7
class arkouda.numpy.dtypes.intTypes

frozenset() -> empty frozenset object frozenset(iterable) -> frozenset object

Build an immutable unordered collection of unique elements.

copy(*args, **kwargs)

Return a shallow copy of a set.

difference(*args, **kwargs)

Return the difference of two or more sets as a new set.

(i.e. all elements that are in this set but not the others.)

intersection(*args, **kwargs)

Return the intersection of two sets as a new set.

(i.e. all elements that are in both sets.)

isdisjoint(*args, **kwargs)

Return True if two sets have a null intersection.

issubset(*args, **kwargs)

Report whether another set contains this set.

issuperset(*args, **kwargs)

Report whether this set contains another set.

symmetric_difference(*args, **kwargs)

Return the symmetric difference of two sets as a new set.

(i.e. all elements that are in exactly one of the sets.)

union(*args, **kwargs)

Return the union of sets as a new set.

(i.e. all elements that are in either set.)

class arkouda.numpy.dtypes.int_scalars(origin, params, *, inst=True, name=None)

Bases: _GenericAlias

The central part of internal API.

This represents a generic version of type ‘origin’ with type arguments ‘params’. There are two kind of these aliases: user defined and special. The special ones are wrappers around builtin collections and ABCs in collections.abc. These must have ‘name’ always set. If ‘inst’ is False, then the alias can’t be instantiated, this is used by e.g. typing.List and typing.Dict.

arkouda.numpy.dtypes.isSupportedFloat(num)[source]
arkouda.numpy.dtypes.isSupportedInt(num)[source]
arkouda.numpy.dtypes.isSupportedNumber(num)[source]
class arkouda.numpy.dtypes.numeric_and_bool_scalars(origin, params, *, inst=True, name=None)

Bases: _GenericAlias

The central part of internal API.

This represents a generic version of type ‘origin’ with type arguments ‘params’. There are two kind of these aliases: user defined and special. The special ones are wrappers around builtin collections and ABCs in collections.abc. These must have ‘name’ always set. If ‘inst’ is False, then the alias can’t be instantiated, this is used by e.g. typing.List and typing.Dict.

class arkouda.numpy.dtypes.numeric_scalars(origin, params, *, inst=True, name=None)

Bases: _GenericAlias

The central part of internal API.

This represents a generic version of type ‘origin’ with type arguments ‘params’. There are two kind of these aliases: user defined and special. The special ones are wrappers around builtin collections and ABCs in collections.abc. These must have ‘name’ always set. If ‘inst’ is False, then the alias can’t be instantiated, this is used by e.g. typing.List and typing.Dict.

class arkouda.numpy.dtypes.numpy_scalars(origin, params, *, inst=True, name=None)

Bases: _GenericAlias

The central part of internal API.

This represents a generic version of type ‘origin’ with type arguments ‘params’. There are two kind of these aliases: user defined and special. The special ones are wrappers around builtin collections and ABCs in collections.abc. These must have ‘name’ always set. If ‘inst’ is False, then the alias can’t be instantiated, this is used by e.g. typing.List and typing.Dict.

arkouda.numpy.dtypes.resolve_scalar_dtype(val: object) str[source]

Try to infer what dtype arkouda_server should treat val as.

class arkouda.numpy.dtypes.str_

A unicode string.

This type strips trailing null codepoints.

>>> s = np.str_("abc\x00")
>>> s
'abc'

Unlike the builtin str, this supports the python:bufferobjects, exposing its contents as UCS4:

>>> m = memoryview(np.str_("abc"))
>>> m.format
'3w'
>>> m.tobytes()
b'a\x00\x00\x00b\x00\x00\x00c\x00\x00\x00'
Character code:

'U'

Alias:

numpy.unicode_

T(*args, **kwargs)

Scalar attribute identical to the corresponding array attribute.

Please see ndarray.T.

all(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.all.

any(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.any.

argmax(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.argmax.

argmin(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.argmin.

argsort(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.argsort.

astype(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.astype.

base(*args, **kwargs)

Scalar attribute identical to the corresponding array attribute.

Please see ndarray.base.

byteswap(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.byteswap.

choose(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.choose.

clip(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.clip.

compress(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.compress.

conj(*args, **kwargs)
conjugate(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.conjugate.

copy(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.copy.

cumprod(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.cumprod.

cumsum(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.cumsum.

data(*args, **kwargs)

Pointer to start of data.

diagonal(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.diagonal.

dtype(*args, **kwargs)

Get array data-descriptor.

dump(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.dump.

dumps(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.dumps.

fill(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.fill.

flags(*args, **kwargs)

The integer value of flags.

flat(*args, **kwargs)

A 1-D view of the scalar.

flatten(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.flatten.

getfield(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.getfield.

imag(*args, **kwargs)

The imaginary part of the scalar.

item(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.item.

itemset(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.itemset.

itemsize(*args, **kwargs)

The length of one element in bytes.

max(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.max.

mean(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.mean.

min(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.min.

nbytes(*args, **kwargs)

The length of the scalar in bytes.

ndim(*args, **kwargs)

The number of array dimensions.

newbyteorder(*args, **kwargs)

newbyteorder(new_order=’S’, /)

Return a new dtype with a different byte order.

Changes are also made in all fields and sub-arrays of the data type.

The new_order code can be any from the following:

  • ‘S’ - swap dtype from current to opposite endian

  • {‘<’, ‘little’} - little endian

  • {‘>’, ‘big’} - big endian

  • {‘=’, ‘native’} - native order

  • {‘|’, ‘I’} - ignore (no change to byte order)

new_orderstr, optional

Byte order to force; a value from the byte order specifications above. The default value (‘S’) results in swapping the current byte order.

new_dtypedtype

New dtype object with the given change to the byte order.

nonzero(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.nonzero.

prod(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.prod.

ptp(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.ptp.

put(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.put.

ravel(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.ravel.

real(*args, **kwargs)

The real part of the scalar.

repeat(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.repeat.

reshape(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.reshape.

resize(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.resize.

round(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.round.

searchsorted(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.searchsorted.

setfield(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.setfield.

setflags(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.setflags.

shape(*args, **kwargs)

Tuple of array dimensions.

size(*args, **kwargs)

The number of elements in the gentype.

sort(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.sort.

squeeze(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.squeeze.

std(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.std.

strides(*args, **kwargs)

Tuple of bytes steps in each dimension.

sum(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.sum.

swapaxes(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.swapaxes.

take(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.take.

tobytes(*args, **kwargs)
tofile(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.tofile.

tolist(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.tolist.

tostring(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.tostring.

trace(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.trace.

transpose(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.transpose.

var(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.var.

view(*args, **kwargs)

Scalar method identical to the corresponding array attribute.

Please see ndarray.view.

class arkouda.numpy.dtypes.str_scalars(origin, params, *, inst=True, name=None)

Bases: _GenericAlias

The central part of internal API.

This represents a generic version of type ‘origin’ with type arguments ‘params’. There are two kind of these aliases: user defined and special. The special ones are wrappers around builtin collections and ABCs in collections.abc. These must have ‘name’ always set. If ‘inst’ is False, then the alias can’t be instantiated, this is used by e.g. typing.List and typing.Dict.

class arkouda.numpy.dtypes.uint16(value)

Bases: numpy.unsignedinteger

Unsigned integer type, compatible with C unsigned short.

Character code:

'H'

Canonical name:

numpy.ushort

Alias on this platform (Linux x86_64):

numpy.uint16: 16-bit unsigned integer (0 to 65_535).

bit_count(*args, **kwargs)

uint16.bit_count() -> int

Computes the number of 1-bits in the absolute value of the input. Analogous to the builtin int.bit_count or popcount in C++.

>>> np.uint16(127).bit_count()
7
class arkouda.numpy.dtypes.uint32(value)

Bases: numpy.unsignedinteger

Unsigned integer type, compatible with C unsigned int.

Character code:

'I'

Canonical name:

numpy.uintc

Alias on this platform (Linux x86_64):

numpy.uint32: 32-bit unsigned integer (0 to 4_294_967_295).

bit_count(*args, **kwargs)

uint32.bit_count() -> int

Computes the number of 1-bits in the absolute value of the input. Analogous to the builtin int.bit_count or popcount in C++.

>>> np.uint32(127).bit_count()
7
class arkouda.numpy.dtypes.uint64(value)

Bases: numpy.unsignedinteger

Unsigned integer type, compatible with C unsigned long.

Character code:

'L'

Canonical name:

numpy.uint

Alias on this platform (Linux x86_64):

numpy.uint64: 64-bit unsigned integer (0 to 18_446_744_073_709_551_615).

Alias on this platform (Linux x86_64):

numpy.uintp: Unsigned integer large enough to fit pointer, compatible with C uintptr_t.

bit_count(*args, **kwargs)

uint64.bit_count() -> int

Computes the number of 1-bits in the absolute value of the input. Analogous to the builtin int.bit_count or popcount in C++.

>>> np.uint64(127).bit_count()
7
class arkouda.numpy.dtypes.uint8(value)

Bases: numpy.unsignedinteger

Unsigned integer type, compatible with C unsigned char.

Character code:

'B'

Canonical name:

numpy.ubyte

Alias on this platform (Linux x86_64):

numpy.uint8: 8-bit unsigned integer (0 to 255).

bit_count(*args, **kwargs)

uint8.bit_count() -> int

Computes the number of 1-bits in the absolute value of the input. Analogous to the builtin int.bit_count or popcount in C++.

>>> np.uint8(127).bit_count()
7