arkouda.scipy.sparrayclass

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.scipy.sparrayclass.create_sparray(rep_msg: 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:

rep_msg (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 rep_msg 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

class arkouda.scipy.sparrayclass.sparray[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 dtype of the array

Type:

type

size

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

Type:

int_scalars

nnz

The number of non-zero elements in the array

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

fill_vals(a: pdarray)[source]
to_pdarray() List[pdarray][source]