|
__init__(self,
array_or_shape=0,
typecode='f',
default=0.)
Create a sparse array from a normal Numeric array or create an
empty sparse array with a certain shape.
|
|
__setAll_1D(self,
a)
Replace content of this sparseArray with values from Numeric array
or list of numbers -- only for 1-dimensional arrays.
|
|
__setAll(self,
a)
Replace content of this array with values from (multidimensional)
Numeric array of numbers or list of lists (of lists..) of
numbers.
|
str
|
typecode(self)
Get type code of object.
|
number
|
default(self)
Get default value, defined in __init__.
|
[ int ]
|
nondefault(self)
Get a 1D list of indices that have a non-default value in a
raveled version of this array.
|
[ number ]
|
nondefault_values(self)
Get a 1D-list of all values != L.default() in the order that they
would have in a raveled array.
|
array
|
toarray(self)
Reconstruct dense array:
|
list
|
tolist(self)
Reconstruct list from dense array:
|
|
put(self,
i,
v)
Replace one or several values, L.put( i, v )
|
|
__setMany(self,
indices,
values)
Add / replace values of the array.
|
int
|
__pos(self,
i)
Target position of given index in index list.
|
|
__setitem__(self,
i,
v)
Set position specifyed by the index i to value v.
|
|
__setitem_1D(self,
i,
v)
Set position specifyed by the index i to value v in a 1D
array.
|
|
__getitem_1D(self,
i)
Value for specified position:
|
|
__getitem__(self,
i)
Value for specified position.
|
int
|
__len__(self)
Get length: supports len( this )
|
0|1
|
__eq__(self,
o)
Comparison equal: supports this == other
|
0|1
|
__ne__(self,
o)
Comparison not equal: supports this != other
|
SparseArray
|
__getslice__(self,
a,
b)
Slice a sparce array:
|
0|1
|
__contains__(self,
v)
Sparse array contains value: supports v in this -> 0|1
|
int
|
count(self,
v)
Count the occuravces of value in sparse array:
|
int
|
index(self,
v)
position of first occurrence of value:
|
1|0
|
empty(self)
Check if object is empty.
|
|
__delitem__(self,
i)
Delete value at index i: supports del this[i]
|
|
insert(self,
i,
v)
Insert value before index:
|
|
append(self,
v,
axis=0)
Enlarge this array along an axis by one value:
|
|
extend(self,
lst)
Extend list by appending elements from the iterable:
|