Sparse matrices: the matrix module

astra.matrix.clear()[source]

Clear all matrix objects.

astra.matrix.create(data)[source]

Create matrix object with data.

Parameters

data (scipy.sparse.csr_matrix) – Data to fill the created object with.

Returns

int – the ID of the constructed object.

astra.matrix.delete(ids)[source]

Delete a matrix object.

Parameters

ids (int or list) – ID or list of ID’s to delete.

astra.matrix.get(i)[source]

Get a matrix object.

Parameters

i (int) – ID of object to get.

Returns

scipy.sparse.csr_matrix – The object data.

astra.matrix.get_size(i)[source]

Get matrix dimensions.

Parameters

i (int) – ID of object.

Returns

tuple – matrix dimensions.

astra.matrix.info()[source]

Print info on matrix objects in memory.

astra.matrix.store(i, data)[source]

Fill existing matrix object with data.

Parameters
  • i (int) – ID of object to fill.

  • data (scipy.sparse.csr_matrix) – Data to fill the object with.