Home | Trees | Indices | Help |
|
---|
|
|
|||
|
__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: |
|
Create a sparse array from a normal Numeric array or create an empty sparse array with a certain shape.
|
Replace content of this sparseArray with values from Numeric array or list of numbers -- only for 1-dimensional arrays.
|
Replace content of this array with values from (multidimensional) Numeric array of numbers or list of lists (of lists..) of numbers.
|
Get type code of object.
|
Get default value, defined in __init__.
|
Get a 1D list of indices that have a non-default value in a raveled version of this array. If L.default()==0 this would be equivalent to nonzero( ravel( L.toarray() ) ) (except that the Numeric array is never constructed).
|
Get a 1D-list of all values != L.default() in the order that they would have in a raveled array. If L.default()==0 this would be equivalent to take( L.toarray(), nonzero( ravel( L.toarray() ) ) ) (except that the Numeric array is never constructed).
|
Reconstruct dense array: L.toarray() -> Numeric.array, normal dense array
|
Reconstruct list from dense array: L.tolist() -> [ ([) number (]) ], same as L.toarray().tolist()
|
Replace one or several values, L.put( i, v )
|
Add / replace values of the array.
|
Target position of given index in index list.
|
Set position specifyed by the index i to value v.
|
Set position specifyed by the index i to value v in a 1D array.
|
Value for specified position: this[ i ] -> number OR SparseArray
|
Value for specified position.
|
Get length: supports len( this )
|
Comparison equal: supports this == other
|
Comparison not equal: supports this != other
|
Slice a sparce array: this[ a : b ] -> SparseArray
|
Sparse array contains value: supports v in this -> 0|1
|
Count the occuravces of value in sparse array: count( value ) -> int, number of occurences of value.
|
position of first occurrence of value: index( value ) -> int
|
Check if object is empty.
|
Delete value at index i: supports del this[i]
|
Insert value before index: this.insert(index, value)
|
Enlarge this array along an axis by one value: L.append( value, [ axis=0 ])
|
Extend list by appending elements from the iterable: L.extend(iterable)
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0alpha3 on Fri Dec 22 20:11:47 2006 | http://epydoc.sourceforge.net |