MatrixDouble#
- class pyopenms.MatrixDouble#
Bases:
objectCython implementation of _Matrix[double]
Original C++ documentation is available here
- __init__()#
Overload:
- __init__(self) None
Overload:
- __init__(self, in_0: MatrixDouble) None
Overload:
- __init__(self, rows: int, cols: int, value: float) None
Methods
Overload:
cols(self)Creates a new Matrix from a numpy ndarray.
getValue(self, i, j)get_matrix(self)Returns a copy of the underlying Matrix as a 2D numpy ndarray.
get_matrix(self) -> np.ndarray[double, ndim=2]
resize(self, rows, cols)rows(self)setValue(self, i, j, value)set_matrix(self, data[, ndim])Copies the values from the numpy ndarray into the Matrix.
size(self)- cols(self) int#
- static fromNdArray()#
Creates a new Matrix from a numpy ndarray.
- getValue(self, i: int, j: int) float#
- get_matrix(self) np.ndarray[double, ndim=2]#
Returns a copy of the underlying Matrix as a 2D numpy ndarray.
- get_matrix_as_view()#
get_matrix(self) -> np.ndarray[double, ndim=2]
Returns a view on the underlying Matrix as a 2D numpy ndarray. .. caution:
Future changes to the Matrix will affect the ndarray and vice versa. Make sure that the Matrix does not go out of scope before the last use of your ndarray.
- resize(self, rows: int, cols: int) None#
- rows(self) int#
- setValue(self, i: int, j: int, value: float) None#
- set_matrix(self, data: np.ndarray[double, ndim=2]) None#
Copies the values from the numpy ndarray into the Matrix.
- size(self) int#