TypeError: loadtxt() got an unexpected keyword argument 'max_rows'
On 2019-09-03 17:29, Terry Reedy wrote:
> On 9/3/2019 12:02 PM, alberto wrote:
>> I produce a script to elaborate data
>> but command line $ python3.4 PlotnhvsvdBTP1.py
>> 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=)
>> TypeError: loadtxt() got an unexpected keyword argument 'max_rows'
>> How could fix it?
> Don't do what the message says is the wrong thing to do. Really.
> In particular, don't pass 'max_rows=1'. To find out what *to* do, read
> the doc for the loadtxt function. From 'skiprows' and 'usecols', with
> no underscore, I suspect you should pass 'maxrows=1'.
No, the documentation says "max_rows".
Apparently, consistency, like the argument, is optional. :-)