git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

TypeError: loadtxt() got an unexpected keyword argument 'max_rows'


On 03/09/2019 17:02, alberto wrote:
> I have this error
> 
> Traceback (most recent call last):
> File "PlotnhvsvdBTP1.py", line 31, in <module>
> UCvol = np.loadtxt(outputtransfile,skiprows=26,max_rows=1,usecols=[1])
> TypeError: loadtxt() got an unexpected keyword argument 'max_rows'
> 
> How could fix it?

A quick google search suggests that you aren't using a recent enough 
version of numpy.  The "max_rows" keyword argument was added to 
loadtxt() in version 1.16.0; you must be using an older version than 
that.  Your options are to upgrade the version of numpy you have (don't 
ask me how, I've never used it) or delete the "max_rows=1" and accept 
the inefficiency.

-- 
Rhodri James *-* Kynesim Ltd