Your array has a dtype
of object
, but this should be some floating point dtype
. Use e.g.
covMat = np.array(covMat, dtype=float)
to convert the dtype
More Related Contents:
- Convert pandas dataframe to NumPy array
- Performance of Pandas apply vs np.vectorize to create new column from existing columns
- Efficiently return the index of the first value satisfying condition in array
- Most efficient way to forward-fill NaN values in numpy array
- Ambiguity in Pandas Dataframe / Numpy Array “axis” definition
- pd.Timestamp versus np.datetime64: are they interchangeable for selected uses?
- Numpy isnan() fails on an array of floats (from pandas dataframe apply)
- Fast punctuation removal with pandas
- String concatenation of two pandas columns
- Is there any numpy group by function?
- Computing the correlation coefficient between two multi-dimensional arrays
- Why is numpy’s einsum faster than numpy’s built in functions?
- How to return 0 with divide by zero
- Calculate average of every x rows in a table and create new table
- Find column name in pandas that matches an array
- Reshape an array in NumPy
- NumPy array initialization (fill with identical values)
- Why does numpy.zeros takes up little space
- Generalise slicing operation in a NumPy array
- Missing data, insert rows in Pandas and fill with NAN
- How to split a numpy array in fixed size chunks with and without overlap?
- which is faster for load: pickle or hdf5 in python
- Why does numpy.linalg.solve() offer more precise matrix inversions than numpy.linalg.inv()?
- load csv into 2D matrix with numpy for plotting
- Filling in date gaps in MultiIndex Pandas Dataframe
- Add numpy array as column to Pandas data frame
- Load CSV to Pandas MultiIndex DataFrame
- Python pandas – new column’s value if the item is in the list
- Why is NaN considered as a float?
- Convert list of lists with different lengths to a numpy array [duplicate]