arkouda.sparrayclass

Attributes

Classes

sparray

The class for sparse arrays. This class contains only the

Functions

create_sparray(→ sparray)

Return a sparray instance pointing to an array created by the arkouda server.

Module Contents

arkouda.sparrayclass.create_sparray(repMsg: str, max_bits=None) sparray[source]

Return a sparray instance pointing to an array created by the arkouda server. The user should not call this function directly.

Parameters:

repMsg (str) – space-delimited string containing the sparray name, datatype, size dimension, shape,and itemsize

Returns:

A sparray with the same attributes as on the server

Return type:

sparray

Raises:
  • ValueError – If there’s an error in parsing the repMsg parameter into the six values needed to create the pdarray instance

  • RuntimeError – Raised if a server-side error is thrown in the process of creating the pdarray instance

arkouda.sparrayclass.logger
class arkouda.sparrayclass.sparray(name: str, mydtype: numpy.dtype | str, size: arkouda.dtypes.int_scalars, nnz: arkouda.dtypes.int_scalars, ndim: arkouda.dtypes.int_scalars, shape: Sequence[int], layout: str, itemsize: arkouda.dtypes.int_scalars, max_bits: int | None = None)[source]

The class for sparse arrays. This class contains only the attributies of the array; the data resides on the arkouda server. When a server operation results in a new array, arkouda will create a sparray instance that points to the array data on the server. As such, the user should not initialize sparray instances directly.

name

The server-side identifier for the array

Type:

str

dtype

The element type of the array

Type:

dtype

size

The size of any one dimension of the array (all dimensions are assumed to be equal sized for now)

Type:

int_scalars

ndim

The rank of the array (currently only rank 2 arrays supported)

Type:

int_scalars

shape

A list or tuple containing the sizes of each dimension of the array

Type:

Sequence[int]

layout

The layout of the array (“CSR” or “CSC” are the only valid values)

Type:

str

itemsize

The size in bytes of each element

Type:

int_scalars

dtype
itemsize
layout
name
ndim
nnz
shape
size