This is the list of classes and functions available in SciDB-py.
SciDBArray class
It is not recommended to instantiate this class directly; use a convenience routine from SciDBInterface.
Methods
alias([name]) | Return an alias of the array, optionally with a new name |
approxdc([index, scidb_syntax]) | Return the number of distinct values of the array or along an axis. |
att(a) | Return the attribute name of the array. |
attribute(a) | Return the attribute name of the array. |
avg([index, scidb_syntax]) | Return the average of the array or the average along an axis. |
contains_nulls([attr]) | Return True if the array contains null values. |
contents(**kwargs) | Return a string representation of the array contents |
copy([new_name, persistent]) | Make a copy of the array in the database |
count([index, scidb_syntax]) | Return the count of the array or the count along an axis. |
dimension(d) | Return the dimension name of the array |
issparse() | Check whether array is sparse. |
max([index, scidb_syntax]) | Return the maximum of the array or the maximum along an axis. |
mean([index, scidb_syntax]) | Return the average of the array or the average along an axis. |
min([index, scidb_syntax]) | Return the minimum of the array or the minimum along an axis. |
nonempty() | Return the number of nonempty elements in the array. |
nonnull([attr]) | Return the number of non-empty and non-null values. |
reap([ignore]) | Delete this object from the database if it isn’t persistent. |
regrid(size[, aggregate]) | Regrid the array using the specified aggregate |
rename(new_name[, persistent]) | Rename the array in the database, optionally making the new array persistent. |
reshape(shape, **kwargs) | Reshape data into a new array |
std([index, scidb_syntax]) | Return the standard deviation of the array or along an axis. |
stdev([index, scidb_syntax]) | Return the standard deviation of the array or along an axis. |
substitute(value) | Reshape data into a new array, substituting a default for any nulls. |
sum([index, scidb_syntax]) | Return the sum of the array or the sum along an axis. |
toarray([transfer_bytes]) | Transfer data from database and store in a numpy array. |
todataframe([transfer_bytes]) | Transfer array from database and store in a local Pandas dataframe |
tosparse([sparse_fmt, transfer_bytes]) | Transfer array from database and store in a local sparse array. |
transpose(*axes) | Permute the dimensions of an array. |
var([index, scidb_syntax]) | Return the variance of the array or the variance along an axis. |
Permute the dimensions of an array.
Parameters: | axes : None, tuple of ints, or n ints
|
---|---|
Returns: | out : ndarray
|
An alias to the AFL namespace
Return an alias of the array, optionally with a new name
Return the number of distinct values of the array or along an axis.
The distinct count is an estimate only.
Parameters: | index : int, optional
scidb_syntax : bool, optional (default=False)
|
---|---|
Returns: | A SciDB array : |
Return the attribute name of the array.
Parameters: | a : int
|
---|
Return the attribute name of the array.
Parameters: | a : int
|
---|
Return the average of the array or the average along an axis.
Parameters: | index : int, optional
scidb_syntax : bool, optional (default=False)
|
---|---|
Returns: | A SciDB array : |
Return True if the array contains null values.
Parameters: | attr : None, int, or array_like
|
---|---|
Returns: | contains_nulls : boolean |
Return a string representation of the array contents
Make a copy of the array in the database
Parameters: | new_name : string (optional)
persistent : boolean (optional)
|
---|---|
Returns: | copy : SciDBArray
|
Return the count of the array or the count along an axis.
The count is equal to the number of nonnull elements.
Parameters: | index : int, optional
scidb_syntax : bool, optional (default=False)
|
---|---|
Returns: | A SciDB array : |
Return the dimension name of the array
Parameters: | d : int
|
---|
Check whether array is sparse.
Return the maximum of the array or the maximum along an axis.
Parameters: | index : int, optional
scidb_syntax : bool, optional (default=False)
|
---|---|
Returns: | A SciDB array : |
Return the average of the array or the average along an axis.
Parameters: | index : int, optional
scidb_syntax : bool, optional (default=False)
|
---|---|
Returns: | A SciDB array : |
Notes
Identical to SciDBArray.avg()
Return the minimum of the array or the minimum along an axis.
Parameters: | index : int, optional
scidb_syntax : bool, optional (default=False)
|
---|---|
Returns: | A SciDB array : |
Return the number of nonempty elements in the array.
Nonempty refers to the sparsity of an array, and thus includes in the count elements with values which are set to NULL.
See also
Return the number of non-empty and non-null values.
This query must be done for each attribute: the default is the first attribute.
Parameters: | attr : None, int or array_like
|
---|---|
Returns: | nonnull : array_like
|
See also
Delete this object from the database if it isn’t persistent.
Parameters: | ignore : bool (default False)
|
---|---|
Raises: | SciDBForbidden if ``persistent=True`` and ``ignore=False` : |
Regrid the array using the specified aggregate
Parameters: | size : int or tuple of ints
aggregate : string
|
---|---|
Returns: | A : scidbarray
|
Rename the array in the database, optionally making the new array persistent.
Parameters: | new_name : string
persistent : boolean (optional)
|
---|---|
Returns: | self : SciDBArray
|
Reshape data into a new array
Parameters: | shape : tuple or int
**kwargs : :
|
---|---|
Returns: | arr : SciDBArray
|
Return the standard deviation of the array or along an axis.
Parameters: | index : int, optional
scidb_syntax : bool, optional (default=False)
|
---|---|
Returns: | A SciDB array : |
Notes
Identical to SciDBArray.stdev()
Return the standard deviation of the array or along an axis.
Parameters: | index : int, optional
scidb_syntax : bool, optional (default=False)
|
---|---|
Returns: | A SciDB array : |
Reshape data into a new array, substituting a default for any nulls.
Parameters: | value : value to replace nulls (required) |
---|---|
Returns: | arr : SciDBArray
|
Return the sum of the array or the sum along an axis.
Parameters: | index : int, optional
scidb_syntax : bool, optional (default=False)
|
---|---|
Returns: | A SciDB array : |
Transfer data from database and store in a numpy array.
Parameters: | transfer_bytes : boolean
|
---|---|
Returns: | arr : np.ndarray
|
Transfer array from database and store in a local Pandas dataframe
This is valid only for a one-dimensional array.
Parameters: | transfer_bytes : boolean
|
---|---|
Returns: | arr : pd.DataFrame
|
Transfer array from database and store in a local sparse array.
Parameters: | transfer_bytes : boolean
sparse_format : string or None
|
---|---|
Returns: | arr : ndarray or sparse matrix
|
Permute the dimensions of an array.
Parameters: | axes : None, tuple of ints, or n ints
|
---|---|
Returns: | out : ndarray
|
Return the variance of the array or the variance along an axis.
Parameters: | index : int, optional
scidb_syntax : bool, optional (default=False)
|
---|---|
Returns: | A SciDB array : |
Methods
acos(A) | Element-wise trigonometric inverse cosine |
approxdc(A[, index, scidb_syntax]) | Array or axis unique element estimate. |
arange([start,] stop[, step,][, dtype]) | Return evenly spaced values within a given interval. |
asin(A) | Element-wise trigonometric inverse sine |
atan(A) | Element-wise trigonometric inverse tangent |
avg(A[, index, scidb_syntax]) | Array or axis average. |
cos(A) | Element-wise trigonometric cosine |
count(A[, index, scidb_syntax]) | Array or axis count. |
cross_join(A, B, *dims) | Perform a cross-join on arrays A and B. |
dot(A, B) | Compute the matrix product of A and B |
exp(A) | Element-wise natural exponent |
from_array(A[, instance_id]) | Initialize a scidb array from a numpy array |
from_dataframe(A[, instance_id]) | Initialize a scidb array from a pandas dataframe |
from_sparse(A[, instance_id]) | Initialize a scidb array from a sparse array |
identity(n[, dtype, sparse]) | Return a 2-dimensional square identity matrix of size n |
join(*args) | Perform a series of array joins on the arguments and return the result. |
linspace(start, stop[, num, endpoint, retstep]) | Return evenly spaced numbers over a specified interval. |
list_arrays([parsed, n]) | List the arrays currently in the database |
log(A) | Element-wise natural logarithm |
log10(A) | Element-wise base-10 logarithm |
max(A[, index, scidb_syntax]) | Array or axis maximum. |
mean(A[, index, scidb_syntax]) | Array or axis mean. |
merge(A, B) | Merge two arrays |
min(A[, index, scidb_syntax]) | Array or axis minimum. |
new_array([shape, dtype, persistent]) | Create a new array, either instantiating it in SciDB or simply reserving the name for use in a later query. |
ones(shape[, dtype]) | Return an array of ones |
query(query, *args, **kwargs) | Perform a query on the database. |
randint(shape[, dtype, lower, upper, persistent]) | Return an array of random integers between lower and upper |
random(shape[, dtype, lower, upper, persistent]) | Return an array of random floats between lower and upper |
reap() | Reap all arrays created via new_array |
sin(A) | Element-wise trigonometric sine |
std(A[, index, scidb_syntax]) | Array or axis standard deviation. |
stdev(A[, index, scidb_syntax]) | Array or axis standard deviation. |
substitute(A, value) | Replace null values in an array |
sum(A[, index, scidb_syntax]) | Array or axis sum. |
svd(A[, return_U, return_S, return_VT]) | Compute the Singular Value Decomposition of the array A: |
tan(A) | Element-wise trigonometric tangent |
toarray(A[, transfer_bytes]) | Convert a SciDB array to a numpy array |
todataframe(A[, transfer_bytes]) | Convert a SciDB array to a pandas dataframe |
tosparse(A[, sparse_fmt, transfer_bytes]) | Convert a SciDB array to a sparse representation |
var(A[, index, scidb_syntax]) | Array or axis variance. |
wrap_array(scidbname[, persistent]) | Create a new SciDBArray object that references an existing SciDB |
zeros(shape[, dtype]) | Return an array of zeros |
Element-wise trigonometric inverse cosine
Array or axis unique element estimate.
Return evenly spaced values within a given interval.
Values are generated within the half-open interval [start, stop) (in other words, the interval including start but excluding stop). For integer arguments the behavior is equivalent to the Python range function, but returns an ndarray rather than a list.
When using a non-integer step, such as 0.1, the results will often not be consistent. It is better to use linspace for these cases.
Parameters: | start : number, optional
stop : number
step : number, optional
dtype : dtype
**kwargs : :
|
---|---|
Returns: | arange : SciDBArray
|
Element-wise trigonometric inverse sine
Element-wise trigonometric inverse tangent
Array or axis average.
see SciDBArray.avg()
Element-wise trigonometric cosine
Array or axis count.
Perform a cross-join on arrays A and B.
Parameters: | A, B : SciDBArray *dims : tuples
|
---|
Compute the matrix product of A and B
Parameters: | A : SciDBArray
B : SciDBArray
|
---|---|
Returns: | C : SciDBArray
|
Element-wise natural exponent
Initialize a scidb array from a numpy array
Parameters: | A : array_like (numpy array or sparse array)
instance_id : integer
**kwargs : :
|
---|---|
Returns: | arr : SciDBArray
|
Initialize a scidb array from a pandas dataframe
Parameters: | A : pandas dataframe
instance_id : integer
**kwargs : :
|
---|---|
Returns: | arr : SciDBArray
|
Initialize a scidb array from a sparse array
Parameters: | A : sparse array
instance_id : integer
**kwargs : :
|
---|---|
Returns: | arr : SciDBArray
|
Return a 2-dimensional square identity matrix of size n
Parameters: | n : integer
dtype : string or list
sparse : boolean
**kwargs : :
|
---|---|
Returns: | arr : SciDBArray
|
Perform a series of array joins on the arguments and return the result.
Return evenly spaced numbers over a specified interval.
Returns num evenly spaced samples, calculated over the interval [start, stop ].
The endpoint of the interval can optionally be excluded.
Parameters: | start : scalar
stop : scalar
num : int, optional
endpoint : bool, optional
retstep : bool, optional
**kwargs : :
|
---|---|
Returns: | samples : SciDBArray
step : float (only if retstep is True)
|
List the arrays currently in the database
Parameters: | parsed : boolean
n : integer
|
---|---|
Returns: | array_list : string or dictionary
|
Element-wise natural logarithm
Element-wise base-10 logarithm
Array or axis maximum.
see SciDBArray.max()
Array or axis mean.
Merge two arrays
Array or axis minimum.
see SciDBArray.min()
Create a new array, either instantiating it in SciDB or simply reserving the name for use in a later query.
Parameters: | shape : int or tuple (optional)
dtype : string (optional)
persistent : boolean (optional)
**kwargs : (optional)
Returns : ——- : arr : SciDBArray
|
---|
Return an array of ones
Parameters: | shape : tuple or int
dtype : string or list
**kwargs : :
|
---|---|
Returns: | arr: SciDBArray :
|
Perform a query on the database.
This wraps a query constructor which allows the creation of sophisticated SciDB queries which act on arrays wrapped by SciDBArray objects. See Notes below for details.
Parameters: | query : string
*args, **kwargs : :
|
---|
Return an array of random integers between lower and upper
Parameters: | shape : tuple or int
dtype : string or list
lower : float
upper : float
persistent : bool
**kwargs : :
|
---|---|
Returns: | arr: SciDBArray :
|
Return an array of random floats between lower and upper
Parameters: | shape : tuple or int
dtype : string or list
lower : float
upper : float
persistent : bool
**kwargs : :
|
---|---|
Returns: | arr: SciDBArray :
|
Reap all arrays created via new_array
Element-wise trigonometric sine
Array or axis standard deviation.
see SciDBArray.std()
Array or axis standard deviation.
Replace null values in an array
Array or axis sum.
see SciDBArray.sum()
Compute the Singular Value Decomposition of the array A:
A = U.S.V^T
Parameters: | A : SciDBArray
return_U, return_S, return_VT : boolean
|
---|---|
Returns: | [U], [S], [VT] : SciDBArrays
|
Element-wise trigonometric tangent
Convert a SciDB array to a numpy array
Convert a SciDB array to a pandas dataframe
Convert a SciDB array to a sparse representation
Array or axis variance.
see SciDBArray.var()
Create a new SciDBArray object that references an existing SciDB array
Parameters: | scidbname : string
persistent : boolean
|
---|
Return an array of zeros
Parameters: | shape : tuple or int
dtype : string or list
**kwargs : :
|
---|---|
Returns: | arr: SciDBArray :
|
HTTP interface to SciDB via shim [1]_
Parameters: | hostname : string
[1] https://github.com/Paradigm4/shim : |
---|
Methods
acos(A) | Element-wise trigonometric inverse cosine |
approxdc(A[, index, scidb_syntax]) | Array or axis unique element estimate. |
arange([start,] stop[, step,][, dtype]) | Return evenly spaced values within a given interval. |
asin(A) | Element-wise trigonometric inverse sine |
atan(A) | Element-wise trigonometric inverse tangent |
avg(A[, index, scidb_syntax]) | Array or axis average. |
cos(A) | Element-wise trigonometric cosine |
count(A[, index, scidb_syntax]) | Array or axis count. |
cross_join(A, B, *dims) | Perform a cross-join on arrays A and B. |
dot(A, B) | Compute the matrix product of A and B |
exp(A) | Element-wise natural exponent |
from_array(A[, instance_id]) | Initialize a scidb array from a numpy array |
from_dataframe(A[, instance_id]) | Initialize a scidb array from a pandas dataframe |
from_sparse(A[, instance_id]) | Initialize a scidb array from a sparse array |
identity(n[, dtype, sparse]) | Return a 2-dimensional square identity matrix of size n |
join(*args) | Perform a series of array joins on the arguments and return the result. |
linspace(start, stop[, num, endpoint, retstep]) | Return evenly spaced numbers over a specified interval. |
list_arrays([parsed, n]) | List the arrays currently in the database |
log(A) | Element-wise natural logarithm |
log10(A) | Element-wise base-10 logarithm |
max(A[, index, scidb_syntax]) | Array or axis maximum. |
mean(A[, index, scidb_syntax]) | Array or axis mean. |
merge(A, B) | Merge two arrays |
min(A[, index, scidb_syntax]) | Array or axis minimum. |
new_array([shape, dtype, persistent]) | Create a new array, either instantiating it in SciDB or simply reserving the name for use in a later query. |
ones(shape[, dtype]) | Return an array of ones |
query(query, *args, **kwargs) | Perform a query on the database. |
randint(shape[, dtype, lower, upper, persistent]) | Return an array of random integers between lower and upper |
random(shape[, dtype, lower, upper, persistent]) | Return an array of random floats between lower and upper |
reap() | Reap all arrays created via new_array |
sin(A) | Element-wise trigonometric sine |
std(A[, index, scidb_syntax]) | Array or axis standard deviation. |
stdev(A[, index, scidb_syntax]) | Array or axis standard deviation. |
substitute(A, value) | Replace null values in an array |
sum(A[, index, scidb_syntax]) | Array or axis sum. |
svd(A[, return_U, return_S, return_VT]) | Compute the Singular Value Decomposition of the array A: |
tan(A) | Element-wise trigonometric tangent |
toarray(A[, transfer_bytes]) | Convert a SciDB array to a numpy array |
todataframe(A[, transfer_bytes]) | Convert a SciDB array to a pandas dataframe |
tosparse(A[, sparse_fmt, transfer_bytes]) | Convert a SciDB array to a sparse representation |
var(A[, index, scidb_syntax]) | Array or axis variance. |
wrap_array(scidbname[, persistent]) | Create a new SciDBArray object that references an existing SciDB |
zeros(shape[, dtype]) | Return an array of zeros |
Element-wise trigonometric inverse cosine
Array or axis unique element estimate.
Return evenly spaced values within a given interval.
Values are generated within the half-open interval [start, stop) (in other words, the interval including start but excluding stop). For integer arguments the behavior is equivalent to the Python range function, but returns an ndarray rather than a list.
When using a non-integer step, such as 0.1, the results will often not be consistent. It is better to use linspace for these cases.
Parameters: | start : number, optional
stop : number
step : number, optional
dtype : dtype
**kwargs : :
|
---|---|
Returns: | arange : SciDBArray
|
Element-wise trigonometric inverse sine
Element-wise trigonometric inverse tangent
Array or axis average.
see SciDBArray.avg()
Element-wise trigonometric cosine
Array or axis count.
Perform a cross-join on arrays A and B.
Parameters: | A, B : SciDBArray *dims : tuples
|
---|
Compute the matrix product of A and B
Parameters: | A : SciDBArray
B : SciDBArray
|
---|---|
Returns: | C : SciDBArray
|
Element-wise natural exponent
Initialize a scidb array from a numpy array
Parameters: | A : array_like (numpy array or sparse array)
instance_id : integer
**kwargs : :
|
---|---|
Returns: | arr : SciDBArray
|
Initialize a scidb array from a pandas dataframe
Parameters: | A : pandas dataframe
instance_id : integer
**kwargs : :
|
---|---|
Returns: | arr : SciDBArray
|
Initialize a scidb array from a sparse array
Parameters: | A : sparse array
instance_id : integer
**kwargs : :
|
---|---|
Returns: | arr : SciDBArray
|
Return a 2-dimensional square identity matrix of size n
Parameters: | n : integer
dtype : string or list
sparse : boolean
**kwargs : :
|
---|---|
Returns: | arr : SciDBArray
|
Perform a series of array joins on the arguments and return the result.
Return evenly spaced numbers over a specified interval.
Returns num evenly spaced samples, calculated over the interval [start, stop ].
The endpoint of the interval can optionally be excluded.
Parameters: | start : scalar
stop : scalar
num : int, optional
endpoint : bool, optional
retstep : bool, optional
**kwargs : :
|
---|---|
Returns: | samples : SciDBArray
step : float (only if retstep is True)
|
List the arrays currently in the database
Parameters: | parsed : boolean
n : integer
|
---|---|
Returns: | array_list : string or dictionary
|
Element-wise natural logarithm
Element-wise base-10 logarithm
Array or axis maximum.
see SciDBArray.max()
Array or axis mean.
Merge two arrays
Array or axis minimum.
see SciDBArray.min()
Create a new array, either instantiating it in SciDB or simply reserving the name for use in a later query.
Parameters: | shape : int or tuple (optional)
dtype : string (optional)
persistent : boolean (optional)
**kwargs : (optional)
Returns : ——- : arr : SciDBArray
|
---|
Return an array of ones
Parameters: | shape : tuple or int
dtype : string or list
**kwargs : :
|
---|---|
Returns: | arr: SciDBArray :
|
Perform a query on the database.
This wraps a query constructor which allows the creation of sophisticated SciDB queries which act on arrays wrapped by SciDBArray objects. See Notes below for details.
Parameters: | query : string
*args, **kwargs : :
|
---|
Return an array of random integers between lower and upper
Parameters: | shape : tuple or int
dtype : string or list
lower : float
upper : float
persistent : bool
**kwargs : :
|
---|---|
Returns: | arr: SciDBArray :
|
Return an array of random floats between lower and upper
Parameters: | shape : tuple or int
dtype : string or list
lower : float
upper : float
persistent : bool
**kwargs : :
|
---|---|
Returns: | arr: SciDBArray :
|
Reap all arrays created via new_array
Element-wise trigonometric sine
Array or axis standard deviation.
see SciDBArray.std()
Array or axis standard deviation.
Replace null values in an array
Array or axis sum.
see SciDBArray.sum()
Compute the Singular Value Decomposition of the array A:
A = U.S.V^T
Parameters: | A : SciDBArray
return_U, return_S, return_VT : boolean
|
---|---|
Returns: | [U], [S], [VT] : SciDBArrays
|
Element-wise trigonometric tangent
Convert a SciDB array to a numpy array
Convert a SciDB array to a pandas dataframe
Convert a SciDB array to a sparse representation
Array or axis variance.
see SciDBArray.var()
Create a new SciDBArray object that references an existing SciDB array
Parameters: | scidbname : string
persistent : boolean
|
---|
Return an array of zeros
Parameters: | shape : tuple or int
dtype : string or list
**kwargs : :
|
---|---|
Returns: | arr: SciDBArray :
|
Build a 1D histogram from a SciDBArray.
Parameters: | X : SciDBArray
att : str (optional)
bins : int (optional)
range : [min, max] (optional)
plot : bool
histtype : ‘bar’ | ‘step’ (default=’bar’)
kwargs : optional
|
---|---|
Returns: | (counts, edges [, artists]) :
|