jnumeric
Class PyMultiarray
- java.lang.Object
-
- org.python.core.PyObject
-
- org.python.core.PySequence
-
- jnumeric.PyMultiarray
-
- All Implemented Interfaces:
- java.io.Serializable
public class PyMultiarray extends PySequence
The container for n-dimensional arrays. The array itself is stored as a one-dimensional array; the mathematical routines manipulating these arrays must treat it appropriately based on their shape and stride.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.python.core.PyObject
PyObject.ConversionException
-
-
Field Summary
Fields Modifier and Type Field and Description static PyTypeATYPEPython class of PyMultiarray.static intmaxLineWidthUsed to format arrays for str([0]) and repr([1])static intprecisionUsed to format arrays for str([0]) and repr([1])static booleansuppressSmallUsed to format arrays for str([0]) and repr([1])-
Fields inherited from class org.python.core.PyObject
gcMonitorGlobal, TYPE
-
-
Constructor Summary
Constructors Constructor and Description PyMultiarray(java.lang.Object data, char _typecode, int start, int[] dimensions, int[] strides)Create a multiarray object given values of instance variables.PyMultiarray(PyObject seq)Create a multiarray object from a sequence.PyMultiarray(PyObject seq, char typecode)Create a multiarray object from a sequence and a type.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description PyObject__abs__()Equivalent to the standard Python __abs__ method.PyObject__add__(PyObject o)Equivalent to the standard Python __add__ method.PyObject__and__(PyObject o)Equivalent to the standard Python __and__ methodint__cmp__(PyObject other)Disable comparison of MultiarraysPyObject__div__(PyObject o)Equivalent to the standard Python __div__ methodPyObject__divmod__(PyObject po)Equivalent to the standard Python __divmod__ methodPyObject__eq(PyObject o)PyObject__findattr_ex__(java.lang.String name)Multiarray attributes are found using__findattr__.PyObject__ge(PyObject o)PyObject__getitem__(int index)Override PyObject method so that get is invoked instead of __finditem__.PyObject__getitem__(PyObject indices)Return the subarray or item indicated by indices.PyObject__gt(PyObject o)PyObject__land(PyObject o)PyObject__le(PyObject o)int__len__()Return the length of the array (along the first axis).PyObject__lor(PyObject o)PyObject__lt(PyObject o)PyObject__lxor(PyObject o)PyObject__max(PyObject o)PyObject__min(PyObject o)PyObject__mod__(PyObject o)Equivalent to the standard Python __mod__ methodPyObject__mul__(PyObject o)Equivalent to the standard Python __mul__ method.PyObject__neg__()Equivalent to the standard Python __neg__ method.PyObject__neq(PyObject o)PyObject__not__()Implements boolean notPyObject__or__(PyObject o)Equivalent to the standard Python __or__ methodPyObject__pow__(PyObject o)Equivalent to the standard Python __pow__ methodPyObject__radd__(PyObject po)Equivalent to the standard Python __radd__ method.PyObject__rdiv__(PyObject po)Equivalent to the standard Python __rdiv__ methodPyObject__rdivmod__(PyObject po)Equivalent to the standard Python __rdivmod__ methodPyString__repr__()Return the repr for this Multiarray.PyObject__rmod__(PyObject po)Equivalent to the standard Python __rmod__ methodPyObject__rmul__(PyObject po)Equivalent to the standard Python __rmul__ method.PyObject__rsub__(PyObject po)Equivalent to the standard Python __rsub__ methodvoid__setattr__(java.lang.String name, PyObject value)Multiarray attributes are set using__setattr__.void__setitem__(PyObject indices, PyObject pyValue)Set the subarray based on indices to PyValue.PyString__str__()Return the str for this Multiarray.PyObject__sub__(PyObject o)Equivalent to the standard Python __sub__ methodjava.lang.Object__tojava__(java.lang.Class<?> c)Convertthisto a java object of Classc.PyObject__xor__(PyObject o)Equivalent to the standard Python __xor__ methodstatic PyMultiarrayargSort(PyObject o, int axis)Returns the indices that would sort an array.static PyMultiarrayarray(PyObject seq)Create a new multiarray fromseq.static PyMultiarrayarray(PyObject seq, char typecode)Create a new multiarray fromseqof typetypecode('\0' indicates the type should be inferred from seq).static PyMultiarrayarrayRange(PyObject start, PyObject stop, PyObject step, char typecode)Create a range of numbers in [start, stop) with the given step and typecode.static PyMultiarrayasarray(PyObject seq)Returnseqif it's a multiarray, otherwise returns a new multiarray.static PyMultiarrayasarray(PyObject seq, char typecode)Returnseqif it's a multiarray of typetypecode, otherwise returns a new multiarray.static PyMultiarrayascontiguous(PyObject seq)Returnseqif it's a contiguous multiarray of typetypecode, otherwise returns a new multiarray.static PyMultiarrayascontiguous(PyObject seq, char _typecode)Returnseqif it's a contiguous multiarray, otherwise returns a new multiarray.PyMultiarrayastype(char type)Return multiarray coerced totype.PyMultiarraybyteswapped()Return a multiarray with data byte swapped (little to big endian).static PyMultiarraychoose(PyObject oA, PyObject b)Implementschoose()/clip()/where()functionality.static PyMultiarrayconcatenate(PyObject po, int axis)Join a sequence of arrays together.static PyMultiarrayconvolve(PyObject oA0, PyObject oB0, int mode)Return convolution of two vectors.PyMultiarraycopy()Return a copy.static PyMultiarraycross_correlate(PyObject oA0, PyObject oB0, int mode)Return cross-correlation of two vectors.static PyMultiarraydiagonal(PyObject o, int offset, int axis)Return the diagonal of a matrix.static PyMultiarrayfromFunction(PyObject function, PyObject shape)Create an array by calling function the coordinates of each element of an array with the given shape.static PyMultiarrayfromString(java.lang.String s, char type)Create a 1D array from a string.static PyMultiarrayindices(PyObject o, char typecode)Create a set of indices for use with fromFunction.static PyObjectinnerProduct(PyObject oA, PyObject oB, int axisA, int axisB)Inner product of two arrays.intiscontiguous()Return (1) if the array is contiguous, 0 otherwise.booleanisNumberType()intitemsize()Return the size (in bytes) of the items.static PyObjectmyMax(PyObject a, PyObject b)static PyObjectmyMin(PyObject a, PyObject b)static PyMultiarrayrepeat(PyObject oA, PyObject oRepeats, int axis)Repeat elements of an array.static PyMultiarrayreshape(PyObject o, int[] shape)Return a reshaped multiarray (shares data withaif it is contiguous).static PyMultiarrayresize(PyObject o, int[] shape)Return a new array with the specified shape.static PyObjectsearchSorted(PyObject o, PyObject v)Return an array of indices of where the items would be locatated in the given array.static int[]shapeOf(PyObject seq)Return the shape of a Python sequence.static PyMultiarraysort(PyObject o, int axis)Return a new, sorted array.static PyMultiarraytake(PyObject oA, PyObject oIndices, int axis)Take elements from an array along an axis.PyListtolist()Return multiarray as a Python list.java.lang.Stringtostring()Return multiarray data represented as a string.java.lang.StringtoString()Return a string representation of the byte array corresponding to this arraystatic PyMultiarraytranspose(PyObject o, int[] perms)Return a multiarray with the axes transposed according toperms(shares data witha).chartypecode()Return the typecode.static PyMultiarrayXC_pad_vector(PyMultiarray V, int padl)Perform padding on vector, prior to using FFT.static intXC_padded_length(int length)Compute the padded length of a vector prior to using FFT.static PyMultiarrayXC_unpad_vector(PyMultiarray R, int lenA, int lenB, int mode)Recover the result of an FFT-based correlation.static PyMultiarrayzeros(int[] shape, char typecode)Create a new multiarray of zeros with shapeshapeof typetypecode.static PyMultiarrayzeros(java.lang.Object shape, char typecode)Create a new multiarray of zeros with shapeshapeof typetypecode.static PyMultiarrayzeros(PyObject shape)Create a new multiarray of zeros with shapeshapewith type inferenced from shape.-
Methods inherited from class org.python.core.PySequence
__delitem__, __delslice__, __eq__, __finditem__, __finditem__, __ge__, __getslice__, __gt__, __iter__, __le__, __lt__, __ne__, __nonzero__, __setitem__, __setslice__, isMappingType, isSequenceType
-
Methods inherited from class org.python.core.PyObject
__call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __coerce__, __coerce_ex__, __complex__, __contains__, __delattr__, __delattr__, __delete__, __delitem__, __delslice__, __dir__, __ensure_finalizer__, __findattr__, __findattr__, __finditem__, __float__, __floordiv__, __format__, __get__, __getattr__, __getattr__, __getnewargs__, __getslice__, __hash__, __hex__, __iadd__, __iand__, __idiv__, __idivmod__, __ifloordiv__, __ilshift__, __imod__, __imul__, __index__, __int__, __invert__, __ior__, __ipow__, __irshift__, __isub__, __iternext__, __itruediv__, __ixor__, __long__, __lshift__, __oct__, __pos__, __pow__, __rand__, __reduce__, __reduce_ex__, __reduce_ex__, __rfloordiv__, __rlshift__, __ror__, __rpow__, __rrshift__, __rshift__, __rtruediv__, __rxor__, __set__, __setattr__, __setitem__, __setslice__, __truediv__, __trunc__, __unicode__, _add, _and, _callextra, _cmp, _div, _divmod, _doget, _doget, _doset, _eq, _floordiv, _ge, _gt, _iadd, _iand, _idiv, _idivmod, _ifloordiv, _ilshift, _imod, _imul, _in, _ior, _ipow, _irshift, _is, _isnot, _isub, _itruediv, _ixor, _jcall, _jcallexc, _jthrow, _le, _lshift, _lt, _mod, _mul, _ne, _notin, _or, _pow, _rshift, _sub, _truediv, _xor, asDouble, asIndex, asIndex, asInt, asInt, asIterable, asLong, asLong, asName, asName, asString, asString, asStringOrNull, asStringOrNull, bit_length, conjugate, delDict, delType, dispatch__init__, equals, fastGetClass, fastGetDict, getDict, getType, hashCode, implementsDescrDelete, implementsDescrGet, implementsDescrSet, invoke, invoke, invoke, invoke, invoke, invoke, isCallable, isDataDescr, isIndex, isInteger, noAttributeError, object___subclasshook__, readonlyAttributeError, setDict, setType
-
-
-
-
Field Detail
-
maxLineWidth
public static int maxLineWidth
Used to format arrays for str([0]) and repr([1])
-
precision
public static int precision
Used to format arrays for str([0]) and repr([1])
-
suppressSmall
public static boolean suppressSmall
Used to format arrays for str([0]) and repr([1])
-
-
Constructor Detail
-
PyMultiarray
public PyMultiarray(java.lang.Object data, char _typecode, int start, int[] dimensions, int[] strides)Create a multiarray object given values of instance variables.- Parameters:
data- The 1D array_typecode- Datatype of the arraystart- Start of the arraydimensions- Dimensionalitystrides- Strides
-
PyMultiarray
public PyMultiarray(PyObject seq, char typecode)
Create a multiarray object from a sequence and a type.- Parameters:
seq- Array-liketypecode- Datatype of the array
-
PyMultiarray
public PyMultiarray(PyObject seq)
Create a multiarray object from a sequence.- Parameters:
seq- Array-like
-
-
Method Detail
-
array
public static PyMultiarray array(PyObject seq, char typecode)
Create a new multiarray fromseqof typetypecode('\0' indicates the type should be inferred from seq).- Parameters:
seq- Array-liketypecode- Datatype of the array- Returns:
- The new multiarray
-
array
public static PyMultiarray array(PyObject seq)
Create a new multiarray fromseq. The type is determined by examiningseq.- Parameters:
seq- Array-like- Returns:
- The new multiarray
-
zeros
public static PyMultiarray zeros(int[] shape, char typecode)
Create a new multiarray of zeros with shapeshapeof typetypecode.- Parameters:
shape- A tuple or list describing the dimensionality of the array (e.g., (10,) for a 10-element vector, [2, 5] for a 2 by 5 matrix))typecode- Datatype of the array- Returns:
- The new multiarray
-
zeros
public static PyMultiarray zeros(java.lang.Object shape, char typecode)
Create a new multiarray of zeros with shapeshapeof typetypecode.- Parameters:
shape- A tuple or list describing the dimensionality of the array (e.g., (10,) for a 10-element vector, [2, 5] for a 2 by 5 matrix))typecode- Datatype of the array- Returns:
- The new multiarray
-
zeros
public static PyMultiarray zeros(PyObject shape)
Create a new multiarray of zeros with shapeshapewith type inferenced from shape.- Parameters:
shape- A tuple or list describing the dimensionality of the array (e.g., (10,) for a 10-element vector, [2, 5] for a 2 by 5 matrix))- Returns:
- The new multiarray
-
arrayRange
public static PyMultiarray arrayRange(PyObject start, PyObject stop, PyObject step, char typecode)
Create a range of numbers in [start, stop) with the given step and typecode.- Parameters:
start- Start of the range (included)stop- End of the range (not included)step- Stepsize between the start and stoptypecode- Datatype of the array- Returns:
- The new multiarray
-
indices
public static PyMultiarray indices(PyObject o, char typecode)
Create a set of indices for use with fromFunction.- Parameters:
o- The input arraytypecode- Datatype of the indices- Returns:
- The set of indices
-
fromFunction
public static PyMultiarray fromFunction(PyObject function, PyObject shape)
Create an array by calling function the coordinates of each element of an array with the given shape.- Parameters:
function- The function to callshape- A tuple or list describing the dimensionality of the array (e.g., (10,) for a 10-element vector, [2, 5] for a 2 by 5 matrix))- Returns:
- The new multiarray
-
fromString
public static PyMultiarray fromString(java.lang.String s, char type)
Create a 1D array from a string.- Parameters:
s- String from which to create the arraytype- Datatype of the array- Returns:
- The new multiarray
- See Also:
toString()
-
asarray
public static PyMultiarray asarray(PyObject seq, char typecode)
Returnseqif it's a multiarray of typetypecode, otherwise returns a new multiarray.- Parameters:
seq- Array-liketypecode- Datatype of the new array- Returns:
- The new multiarray
-
asarray
public static PyMultiarray asarray(PyObject seq)
Returnseqif it's a multiarray, otherwise returns a new multiarray.- Parameters:
seq- Array-like- Returns:
- The new multiarray
-
ascontiguous
public static PyMultiarray ascontiguous(PyObject seq, char _typecode)
Returnseqif it's a contiguous multiarray, otherwise returns a new multiarray.- Parameters:
seq- Array-like_typecode- Datatype (a single character)- Returns:
- The new multiarray
-
ascontiguous
public static PyMultiarray ascontiguous(PyObject seq)
Returnseqif it's a contiguous multiarray of typetypecode, otherwise returns a new multiarray.- Parameters:
seq- Array-like- Returns:
- The new multiarray
-
typecode
public char typecode()
Return the typecode.- Returns:
- The typecode
- See Also:
_typecode
-
itemsize
public int itemsize()
Return the size (in bytes) of the items.- Returns:
- The size (in bytes) of the items
-
iscontiguous
public int iscontiguous()
Return (1) if the array is contiguous, 0 otherwise.- Returns:
- 1 if the array is contiguous, 0 otherwise
-
astype
public PyMultiarray astype(char type)
Return multiarray coerced totype. Note that CNumeric does the equivalent of return array(this, type) here.- Parameters:
type- The output type- Returns:
- The new multiarray
-
tostring
public java.lang.String tostring()
Return multiarray data represented as a string.- Returns:
- The string representation
-
byteswapped
public final PyMultiarray byteswapped()
Return a multiarray with data byte swapped (little to big endian).- Returns:
- The byte swapped multiarray
-
copy
public final PyMultiarray copy()
Return a copy.- Returns:
- Multiarray copy
-
tolist
public final PyList tolist()
Return multiarray as a Python list.- Returns:
- Python list with the same data as the multiarray
-
reshape
public static PyMultiarray reshape(PyObject o, int[] shape)
Return a reshaped multiarray (shares data withaif it is contiguous).- Parameters:
o- Input arrayshape- A tuple or list describing the dimensionality of the array (e.g., (10,) for a 10-element vector, [2, 5] for a 2 by 5 matrix))- Returns:
- The reshaped multiarray
-
resize
public static PyMultiarray resize(PyObject o, int[] shape)
Return a new array with the specified shape. The original array can have any total size.- Parameters:
o- Input arrayshape- A tuple or list describing the dimensionality of the array (e.g., (10,) for a 10-element vector, [2, 5] for a 2 by 5 matrix))- Returns:
- The resized multiarray
-
sort
public static PyMultiarray sort(PyObject o, int axis)
Return a new, sorted array.- Parameters:
o- Array to be sortedaxis- Axis over which to sort- Returns:
- A new, sorted array
-
argSort
public static PyMultiarray argSort(PyObject o, int axis)
Returns the indices that would sort an array.- Parameters:
o- Input arrayaxis- Axis over which to sort- Returns:
- The indices that would sort the array.
-
transpose
public static PyMultiarray transpose(PyObject o, int[] perms)
Return a multiarray with the axes transposed according toperms(shares data witha).- Parameters:
o- Input arrayperms- Axes to transpose- Returns:
- The transposed multiarray
-
repeat
public static PyMultiarray repeat(PyObject oA, PyObject oRepeats, int axis)
Repeat elements of an array.- Parameters:
oA- Input arrayoRepeats- The number of repetitions for each element.axis- The axis along which to repeat values.- Returns:
- Output array which has the same shape as a, except along the given axis.
-
take
public static PyMultiarray take(PyObject oA, PyObject oIndices, int axis)
Take elements from an array along an axis.- Parameters:
oA- The source array.oIndices- The indices of the values to extract.axis- The axis over which to select values.- Returns:
- The returned array has the same type as oA.
-
choose
public static PyMultiarray choose(PyObject oA, PyObject b)
Implementschoose()/clip()/where()functionality. Choose elements from objectoAbased on set of indicesb.- Parameters:
oA- This array must contain integers in [0, n-1], where n is the number of choices, unless mode=wrap or mode=clip, in which cases any integers are permissible.b- Choice arrays. a and all of the choices must be broadcastable to the same shape.- Returns:
- The merged result.
-
concatenate
public static PyMultiarray concatenate(PyObject po, int axis)
Join a sequence of arrays together.- Parameters:
po- sequence of array_like. The arrays must have the same shape, except in the dimension corresponding to axis (the first, by default).axis- The axis along which the arrays will be joined. Default: 0.- Returns:
- The concatenated array.
-
diagonal
public static PyMultiarray diagonal(PyObject o, int offset, int axis)
Return the diagonal of a matrix. Actually, it returns a rank-one array containing all elements of the original, such that the difference between their indices along the specified axes is equal to the specified offset. This means it can operate on non-square matrices too.- Parameters:
o- Array from which the diagonals are taken.offset- Offset of the diagonal from the main diagonal. Can be positive or negative.axis- Axis from which the diagonals should be taken.- Returns:
- A 1-D array containing the diagonal.
-
innerProduct
public static PyObject innerProduct(PyObject oA, PyObject oB, int axisA, int axisB)
Inner product of two arrays.- Parameters:
oA- First input arrayoB- Second input arrayaxisA- Axis for the first arrayaxisB- Axis for the second array- Returns:
- Inner product of the two arrays.
-
searchSorted
public static PyObject searchSorted(PyObject o, PyObject v)
Return an array of indices of where the items would be locatated in the given array.- Parameters:
o- Input array, sorted in ascending orderv- Values to insert into o- Returns:
- Array of insertion points with the same shape as v
-
convolve
public static PyMultiarray convolve(PyObject oA0, PyObject oB0, int mode)
Return convolution of two vectors.- Parameters:
oA0- First vectoroB0- Second vectormode- Convolution mode, as an integer. 0 = 'valid'; This returns output of length max(M, N) - min(M, N) + 1. The convolution product is only given for points where the signals overlap completely. Values outside the signal boundary have no effect. 1 = 'same'; This returns output of length max(M, N). Boundary effects are still visible. 2 = 'full'; This returns the convolution at each point of overlap, with an output shape of (N+M-1,). At the end-points of the convolution, the signals do not overlap completely, and boundary effects may be seen.- Returns:
- Discrete, linear convolution of oA0 and oB0
-
XC_padded_length
public static int XC_padded_length(int length)
Compute the padded length of a vector prior to using FFT. This is a helper routine for cross_correlate()- Parameters:
length- Length of original vector- Returns:
- Length of padded vector
-
XC_pad_vector
public static PyMultiarray XC_pad_vector(PyMultiarray V, int padl)
Perform padding on vector, prior to using FFT. This is a helper routine for cross_correlate()- Parameters:
V- Input vectorpadl- Length to pad to- Returns:
- Padded vector
-
XC_unpad_vector
public static PyMultiarray XC_unpad_vector(PyMultiarray R, int lenA, int lenB, int mode)
Recover the result of an FFT-based correlation. This is a helper routine for cross_correlate()- Parameters:
R- Input vectorlenA- Dimensions of AlenB- Dimensions of Bmode- Correlation mode; see PyMulitarray.convolve- Returns:
- Unpadded vector
-
cross_correlate
public static PyMultiarray cross_correlate(PyObject oA0, PyObject oB0, int mode)
Return cross-correlation of two vectors. Cross-correlation is performed in Fourier space, since the computational complexity is Nlog(N), compared to N^2 in real space, (N=length of vectors),- Parameters:
oA0- First vectoroB0- Second vectormode- Convolution mode; see PyMultiarray.convolve- Returns:
- Cross-correlation of the two vectors
-
shapeOf
public static final int[] shapeOf(PyObject seq)
Return the shape of a Python sequence.- Parameters:
seq- Array-like- Returns:
- The shape of
seq
-
__tojava__
public java.lang.Object __tojava__(java.lang.Class<?> c)
Convertthisto a java object of Classc.- Overrides:
__tojava__in classPySequence- Parameters:
c- the Class to convert thisPyObjectto.
-
__len__
public int __len__()
Return the length of the array (along the first axis).
-
__getitem__
public PyObject __getitem__(int index)
Override PyObject method so that get is invoked instead of __finditem__.- Overrides:
__getitem__in classPyObject- Parameters:
index- the key to lookup in this container.- Returns:
- the value corresponding to that key.
- See Also:
PyObject.__finditem__(int)
-
__cmp__
public int __cmp__(PyObject other)
Disable comparison of Multiarrays
-
__getitem__
public PyObject __getitem__(PyObject indices)
Return the subarray or item indicated by indices.- Overrides:
__getitem__in classPySequence- Parameters:
indices- the key to lookup in this container.- Returns:
- the value corresponding to that key.
- See Also:
PyObject.__finditem__(PyObject)
-
__setitem__
public void __setitem__(PyObject indices, PyObject pyValue)
Set the subarray based on indices to PyValue.- Overrides:
__setitem__in classPySequence- Parameters:
indices- the key whose value will be setpyValue- the value to set this key to
-
__repr__
public PyString __repr__()
Return the repr for this Multiarray.
-
__str__
public PyString __str__()
Return the str for this Multiarray.
-
__findattr_ex__
public PyObject __findattr_ex__(java.lang.String name)
Multiarray attributes are found using__findattr__.- Overrides:
__findattr_ex__in classPyObject- Returns:
- The looked up value. May return null if the attribute is not found
-
__setattr__
public void __setattr__(java.lang.String name, PyObject value) throws PyExceptionMultiarray attributes are set using__setattr__.- Overrides:
__setattr__in classPyObject- Parameters:
name- the name whose value will be set - must be an interned string .value- the value to set this name to- Throws:
PyException- See Also:
PyObject.__setattr__(PyString, PyObject)
-
toString
public java.lang.String toString()
Return a string representation of the byte array corresponding to this array
-
__radd__
public PyObject __radd__(PyObject po)
Description copied from class:PyObjectEquivalent to the standard Python __radd__ method.
-
__rsub__
public PyObject __rsub__(PyObject po)
Description copied from class:PyObjectEquivalent to the standard Python __rsub__ method
-
__rmul__
public PyObject __rmul__(PyObject po)
Description copied from class:PyObjectEquivalent to the standard Python __rmul__ method.
-
__rdiv__
public PyObject __rdiv__(PyObject po)
Description copied from class:PyObjectEquivalent to the standard Python __rdiv__ method
-
__rmod__
public PyObject __rmod__(PyObject po)
Description copied from class:PyObjectEquivalent to the standard Python __rmod__ method
-
__divmod__
public PyObject __divmod__(PyObject po)
Description copied from class:PyObjectEquivalent to the standard Python __divmod__ method- Overrides:
__divmod__in classPyObject- Parameters:
po- the object to perform this binary operation with (the right-hand operand).- Returns:
- the result of the divmod, or null if this operation is not defined
-
__rdivmod__
public PyObject __rdivmod__(PyObject po)
Description copied from class:PyObjectEquivalent to the standard Python __rdivmod__ method- Overrides:
__rdivmod__in classPyObject- Parameters:
po- the object to perform this binary operation with (the left-hand operand).- Returns:
- the result of the divmod, or null if this operation is not defined.
-
__add__
public PyObject __add__(PyObject o)
Description copied from class:PyObjectEquivalent to the standard Python __add__ method.
-
__sub__
public PyObject __sub__(PyObject o)
Description copied from class:PyObjectEquivalent to the standard Python __sub__ method
-
__mul__
public PyObject __mul__(PyObject o)
Description copied from class:PyObjectEquivalent to the standard Python __mul__ method.
-
__div__
public PyObject __div__(PyObject o)
Description copied from class:PyObjectEquivalent to the standard Python __div__ method
-
__mod__
public PyObject __mod__(PyObject o)
Description copied from class:PyObjectEquivalent to the standard Python __mod__ method
-
__pow__
public PyObject __pow__(PyObject o)
Description copied from class:PyObjectEquivalent to the standard Python __pow__ method
-
myMax
public static PyObject myMax(PyObject a, PyObject b)
- Parameters:
a- First arrayb- Second array- Returns:
- Maximum values from the two arrays
-
myMin
public static PyObject myMin(PyObject a, PyObject b)
- Parameters:
a- First arrayb- Second array- Returns:
- Minimum values from the two arrays
-
__max
public PyObject __max(PyObject o)
- Parameters:
o- Input array- Returns:
- Maximum value from the array
-
__min
public PyObject __min(PyObject o)
- Parameters:
o- Input array- Returns:
- Minimum value from the array
-
__eq
public PyObject __eq(PyObject o)
- Parameters:
o- Input array- Returns:
- Where the two arrays are equal
-
__neq
public PyObject __neq(PyObject o)
- Parameters:
o- Input array- Returns:
- Where the two arrays are not equal
-
__ge
public PyObject __ge(PyObject o)
- Parameters:
o- Input array- Returns:
- Where greater than or equal
-
__and__
public PyObject __and__(PyObject o)
Description copied from class:PyObjectEquivalent to the standard Python __and__ method
-
__or__
public PyObject __or__(PyObject o)
Description copied from class:PyObjectEquivalent to the standard Python __or__ method
-
__xor__
public PyObject __xor__(PyObject o)
Description copied from class:PyObjectEquivalent to the standard Python __xor__ method
-
isNumberType
public boolean isNumberType() throws PyIgnoreMethodTag- Overrides:
isNumberTypein classPySequence- Throws:
PyIgnoreMethodTag
-
__abs__
public PyObject __abs__()
Description copied from class:PyObjectEquivalent to the standard Python __abs__ method.
-
__neg__
public PyObject __neg__()
Description copied from class:PyObjectEquivalent to the standard Python __neg__ method.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG