Record Class PyValue.Array
java.lang.Object
java.lang.Record
com.eco.bio7.pyffm.PyValue.Array
- Record Components:
data- a double[], float[], long[], int[], short[] or byte[] (also for the unsigned types: the bits as in numpy) or boolean[]dtype- the numpy type: "f8", "f4", "i8", "i4", "i2", "i1", "u1", "u2", "u4", "u8", "b1"shape- the shape ({} for a scalar)
- All Implemented Interfaces:
PyValue
- Enclosing interface:
PyValue
-
Nested Class Summary
Nested classes/interfaces inherited from interface PyValue
PyValue.Array, PyValue.Frame, PyValue.None, PyValue.Other, PyValue.PyDict, PyValue.PyList, PyValue.StrModifier and TypeInterfaceDescriptionstatic final recordA numeric or boolean array.static final recordA table (a pandas DataFrame): the columns by name (each an Array or Str) and the row labels (null for the default 0..n-1).static final recordNone.static final recordAny other object: its type and repr (not transferable).static final recordA dict (the keys as strings, in their order).static final recordA list or tuple.static final recordStrings (null elements are None in Python). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleasDouble()The first element as double.double[][]A 2-d array as rows of doubles.double[]The data as double values (a copy, unsigned types as unsigned values).int[]asInts()The data as int values (rounded towards zero).data()Returns the value of thedatarecord component.dtype()Returns the value of thedtyperecord component.booleanIndicates whether some other object is "equal to" this one.doublegetDouble(int i) The element as double (unsigned types as unsigned values).inthashCode()Returns a hash code value for this object.booleanisScalar()Returns true for a scalar (shape {}).intlength()The number of elements.int[]shape()Returns the value of theshaperecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
Array
-
-
Method Details
-
length
-
isScalar
public boolean isScalar()Returns true for a scalar (shape {}). -
getDouble
public double getDouble(int i) The element as double (unsigned types as unsigned values). -
asDoubles
public double[] asDoubles()The data as double values (a copy, unsigned types as unsigned values). -
asInts
public int[] asInts()The data as int values (rounded towards zero). -
asDouble
public double asDouble()The first element as double. -
asDoubleMatrix
public double[][] asDoubleMatrix()A 2-d array as rows of doubles. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
hashCode
-
toString
-
data
-
dtype
-
shape
-