jnumeric
Class BinaryUfunc
- java.lang.Object
-
- org.python.core.PyObject
-
- jnumeric.KeywordFunction
-
- jnumeric.BinaryUfunc
-
- All Implemented Interfaces:
- java.io.Serializable
public class BinaryUfunc extends KeywordFunction
Universal functions that take two PyMultiarrays as input.- 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 jnumeric.BinaryFunctionaddAdds two arrays.static jnumeric.BinaryFunctionargMaxFinds the index of the largest elements between two arrays.static jnumeric.BinaryFunctionargMinFinds the index of the smallest elements between two arrays.static jnumeric.BinaryFunctionbitwiseAndDoes a bitwise and between two arrays.static jnumeric.BinaryFunctionbitwiseOrDoes a bitwise or between two arrays.static jnumeric.BinaryFunctionbitwiseXorDoes a bitwise exclusive-or between two arrays.static jnumeric.BinaryFunctiondivideDivides two arrays.static jnumeric.BinaryFunctionequalFinds where two arrays are equal.static jnumeric.BinaryFunctiongreaterFinds where an array is greater than another array.static jnumeric.BinaryFunctiongreaterEqualFinds where an array is greater than or equal to another array.static jnumeric.BinaryFunctionlessFinds where an array is less than another array.static jnumeric.BinaryFunctionlessEqualFinds where an array is less than or equal to another array.static jnumeric.BinaryFunctionlogicalAndTakes the logical and of two binary arrays.static jnumeric.BinaryFunctionlogicalOrTakes the logical or of two binary arrays.static jnumeric.BinaryFunctionlogicalXorTakes the logical exclusive-or of two binary arrays.static jnumeric.BinaryFunctionmaximumFinds the maximum values between two arrays.static jnumeric.BinaryFunctionminimumFinds the minimum values between two arrays.static jnumeric.BinaryFunctionmultiplyMultiplies two arrays.static jnumeric.BinaryFunctionnotEqualFinds where two arrays are not equal.static jnumeric.BinaryFunctionpowerTakes an array to the power of another.static jnumeric.BinaryFunctionremainderFinds the remainder after dividing two arrays.static jnumeric.BinaryFunctionsubtractSubtracts two arrays.-
Fields inherited from class org.python.core.PyObject
gcMonitorGlobal, TYPE
-
-
Constructor Summary
Constructors Constructor and Description BinaryUfunc(jnumeric.BinaryFunction function)Wraps a BinaryFunction into a universal function.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description PyObject__findattr_ex__(java.lang.String name)Attribute lookup hook.PyObject_call(PyObject[] args)PyObjectaccumulate(PyObject po)Overloaded accumulate, defaults axis to 0.PyObjectaccumulate(PyObject po, int axis)This is the same as reduce, except that all the intermediate results are kept along the way.PyObjectouter(PyObject poa, PyObject pob)Takes the outer product of a and b.PyObjectreduce(PyObject po)Overloaded reduce, defaults axis to 0.PyObjectreduce(PyObject po, int axis)Works just like reduce(ufunc, a, [ufunc's identity element]) except you get to choose the axis to perform the reduction along.PyObjectreduceat(PyObject po, int[] indices)Overloaded function for if no axis is passed.PyObjectreduceat(PyObject po, int[] indices, int axis)This is a weird function, and most people should just ignore it.-
Methods inherited from class jnumeric.KeywordFunction
__call__
-
Methods inherited from class org.python.core.PyObject
__abs__, __add__, __and__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __cmp__, __coerce__, __coerce_ex__, __complex__, __contains__, __delattr__, __delattr__, __delete__, __delitem__, __delitem__, __delslice__, __delslice__, __dir__, __div__, __divmod__, __ensure_finalizer__, __eq__, __findattr__, __findattr__, __finditem__, __finditem__, __finditem__, __float__, __floordiv__, __format__, __ge__, __get__, __getattr__, __getattr__, __getitem__, __getitem__, __getnewargs__, __getslice__, __getslice__, __gt__, __hash__, __hex__, __iadd__, __iand__, __idiv__, __idivmod__, __ifloordiv__, __ilshift__, __imod__, __imul__, __index__, __int__, __invert__, __ior__, __ipow__, __irshift__, __isub__, __iter__, __iternext__, __itruediv__, __ixor__, __le__, __len__, __long__, __lshift__, __lt__, __mod__, __mul__, __ne__, __neg__, __nonzero__, __not__, __oct__, __or__, __pos__, __pow__, __pow__, __radd__, __rand__, __rdiv__, __rdivmod__, __reduce__, __reduce_ex__, __reduce_ex__, __repr__, __rfloordiv__, __rlshift__, __rmod__, __rmul__, __ror__, __rpow__, __rrshift__, __rshift__, __rsub__, __rtruediv__, __rxor__, __set__, __setattr__, __setattr__, __setitem__, __setitem__, __setitem__, __setslice__, __setslice__, __str__, __sub__, __tojava__, __truediv__, __trunc__, __unicode__, __xor__, _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, isMappingType, isNumberType, isSequenceType, noAttributeError, object___subclasshook__, readonlyAttributeError, setDict, setType, toString
-
-
-
-
Field Detail
-
add
public static final jnumeric.BinaryFunction add
Adds two arrays.
-
subtract
public static final jnumeric.BinaryFunction subtract
Subtracts two arrays.
-
multiply
public static final jnumeric.BinaryFunction multiply
Multiplies two arrays.
-
divide
public static final jnumeric.BinaryFunction divide
Divides two arrays.
-
remainder
public static final jnumeric.BinaryFunction remainder
Finds the remainder after dividing two arrays.
-
power
public static final jnumeric.BinaryFunction power
Takes an array to the power of another.
-
maximum
public static final jnumeric.BinaryFunction maximum
Finds the maximum values between two arrays.
-
minimum
public static final jnumeric.BinaryFunction minimum
Finds the minimum values between two arrays.
-
equal
public static final jnumeric.BinaryFunction equal
Finds where two arrays are equal.
-
notEqual
public static final jnumeric.BinaryFunction notEqual
Finds where two arrays are not equal.
-
less
public static final jnumeric.BinaryFunction less
Finds where an array is less than another array.
-
lessEqual
public static final jnumeric.BinaryFunction lessEqual
Finds where an array is less than or equal to another array.
-
greater
public static final jnumeric.BinaryFunction greater
Finds where an array is greater than another array.
-
greaterEqual
public static final jnumeric.BinaryFunction greaterEqual
Finds where an array is greater than or equal to another array.
-
logicalAnd
public static final jnumeric.BinaryFunction logicalAnd
Takes the logical and of two binary arrays.
-
logicalOr
public static final jnumeric.BinaryFunction logicalOr
Takes the logical or of two binary arrays.
-
logicalXor
public static final jnumeric.BinaryFunction logicalXor
Takes the logical exclusive-or of two binary arrays.
-
bitwiseAnd
public static final jnumeric.BinaryFunction bitwiseAnd
Does a bitwise and between two arrays.
-
bitwiseOr
public static final jnumeric.BinaryFunction bitwiseOr
Does a bitwise or between two arrays.
-
bitwiseXor
public static final jnumeric.BinaryFunction bitwiseXor
Does a bitwise exclusive-or between two arrays.
-
argMax
public static final jnumeric.BinaryFunction argMax
Finds the index of the largest elements between two arrays.
-
argMin
public static final jnumeric.BinaryFunction argMin
Finds the index of the smallest elements between two arrays.
-
-
Constructor Detail
-
BinaryUfunc
public BinaryUfunc(jnumeric.BinaryFunction function)
Wraps a BinaryFunction into a universal function.- Parameters:
function- The function to wrap
-
-
Method Detail
-
__findattr_ex__
public PyObject __findattr_ex__(java.lang.String name)
Description copied from class:PyObjectAttribute lookup hook. If the attribute is not found, null may be returned or a Py.AttributeError can be thrown, whatever is more correct, efficient and/or convenient for the implementing class. Client code should usePyObject.__getattr__(String)orPyObject.__findattr__(String). Both methods have a clear policy for failed lookups.- Overrides:
__findattr_ex__in classKeywordFunction- Returns:
- The looked up value. May return null if the attribute is not found
-
outer
public PyObject outer(PyObject poa, PyObject pob)
Takes the outer product of a and b. The new results shape will be the same as a.shape + b.shape (where plus means concatenate, not add!)- Parameters:
poa- PyMultiArray apob- PyMultiArray b- Returns:
- Outer produce of poa and pob.
-
reduceat
public PyObject reduceat(PyObject po, int[] indices, int axis)
This is a weird function, and most people should just ignore it. It will reduce a to each of the given indices so that as new size along the given axis will be the same as the length of indices. If axis is not supplied it defaults to zero.- Parameters:
po- Input PyMultiArrayindices- The indices to reduce toaxis- Axis along which to reduce (default: 0)- Returns:
- The reduced array, with size == indices.length
-
reduceat
public PyObject reduceat(PyObject po, int[] indices)
Overloaded function for if no axis is passed. Defaults to 0.- Parameters:
po- Input PyMultiArrayindices- The indices to reduce to- Returns:
- result of reduceat(po, indices, 0)
- See Also:
reduceat(PyObject, int[], int)
-
reduce
public PyObject reduce(PyObject po, int axis)
Works just like reduce(ufunc, a, [ufunc's identity element]) except you get to choose the axis to perform the reduction along. Note that if the length of a long axis is 0, then the appropriate identity element for the ufunc will be returned.- Parameters:
po- Input PyMultiArrayaxis- Axis along which to reduce (default: 0)- Returns:
- Result of reducing the ufunc
-
reduce
public PyObject reduce(PyObject po)
Overloaded reduce, defaults axis to 0.- Parameters:
po- Input PyMultiArray- Returns:
- Result of calling reduce(po, 0)
- See Also:
reduce(PyObject, int)
-
accumulate
public PyObject accumulate(PyObject po, int axis)
This is the same as reduce, except that all the intermediate results are kept along the way.- Parameters:
po- Input PyMultiArrayaxis- Axis over which to reduce (default: 0)- Returns:
- The intermediate results of reducing po
-
accumulate
public PyObject accumulate(PyObject po)
Overloaded accumulate, defaults axis to 0.- Parameters:
po- Input PyMultiArray- Returns:
- Result of calling accumulate(po, 0)
- See Also:
accumulate(PyObject, int)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG