TensorFlowSparseArray

Provides a SparseArray implementation that uses TensorFlow as the backend

 

__init__(self, data, dtype=None): 

 

@property
shape(self): 

Provides the shape of the sparse array

  • :returns: tuple[int]

 

to_state(self, serializer=None): 

Provides just the state that is needed to serialize the object

  • serializer: Any
  • :returns: _

 

from_state(state, serializer=None): 

Loads from the stored state

  • serializer: Any
  • :returns: _

 

empty(shape, dtype=None, **kw): 

Returns an empty SparseArray with the appropriate shape and dtype

  • shape: Any
  • dtype: Any
  • kw: Any
  • :returns: _

 

@property
block_data(self): 

Returns the row and column indices and vector of values that the sparse array is storing

  • :returns: Tuple[np.ndarray, Iterable[np.ndarray]]

 

transpose(self, axes): 

Returns a transposed version of the tensor

  • axes: Any
  • :returns: _

 

ascoo(self): 

Converts the tensor into a scipy COO matrix…

  • :returns: sp.coo_matrix

 

ascsr(self): 

Converts the tensor into a scipy COO matrix…

  • :returns: sp.coo_matrix

 

reshape(self, newshape): 

Returns a reshaped version of the tensor

  • axes: Any
  • :returns: _

 

__truediv__(self, other): 

 

__rtruediv__(self, other): 

 

__rmul__(self, other): 

 

__mul__(self, other): 

 

true_multiply(self, other): 

Multiplies self and other

  • other: Any
  • :returns: _

 

dot(self, other): 

Takes a regular dot product of self and other

  • other: Any
  • axes: Any
  • :returns: _

Feedback

Examples

Templates

Documentation