Re: 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: Hi, 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 UCvol = np.loadtxt(outputtransfile,skiprows=26,max_rows=1,usecols=[1]) 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. :-) -- https://mail.python.org/mailman/listinfo/python-list
Re: TypeError: loadtxt() got an unexpected keyword argument 'max_rows'
On 2019-09-03 17:02, alberto wrote: Hi, 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 UCvol = np.loadtxt(outputtransfile,skiprows=26,max_rows=1,usecols=[1]) TypeError: loadtxt() got an unexpected keyword argument 'max_rows' How could fix it? I attacched my files https://drive.google.com/file/d/1PgOcuEMFsaAuKTsbU0i0gwg04mDCJJoK/view?usp=sharing https://drive.google.com/file/d/13E7vcGQtrOS1lw9RupGThGQ2vSGRfTFG/view?usp=sharing https://drive.google.com/file/d/1Z6GKYtHthAyPO3wFHUFK10QweRpclu29/view?usp=sharing The "max_rows" keyword argument is new in numpy version 1.16.0. Which version do you have? Try: import numpy print(numpy.__version__) to find out. -- https://mail.python.org/mailman/listinfo/python-list
Re: TypeError: loadtxt() got an unexpected keyword argument 'max_rows'
On 9/3/2019 12:02 PM, alberto wrote: Hi, 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 UCvol = np.loadtxt(outputtransfile,skiprows=26,max_rows=1,usecols=[1]) 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'. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list
Re: 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 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 -- https://mail.python.org/mailman/listinfo/python-list
Re: TypeError: loadtxt() got an unexpected keyword argument 'max_rows'
On Tue, Sep 3, 2019 at 12:06 PM alberto wrote: > > Hi, > 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 > UCvol = np.loadtxt(outputtransfile,skiprows=26,max_rows=1,usecols=[1]) > TypeError: loadtxt() got an unexpected keyword argument 'max_rows' > > How could fix it? > > I attacched my files > > https://drive.google.com/file/d/1PgOcuEMFsaAuKTsbU0i0gwg04mDCJJoK/view?usp=sharing > https://drive.google.com/file/d/13E7vcGQtrOS1lw9RupGThGQ2vSGRfTFG/view?usp=sharing > https://drive.google.com/file/d/1Z6GKYtHthAyPO3wFHUFK10QweRpclu29/view?usp=sharing > > regard > > Alberto Please don't attach files. Cut and paste code as text into email body along with copy and pasted traceback. That said I found this:.. versionadded:: 1.14.0 max_rows : int, optional Check your version of loadtxt()? > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays -- https://mail.python.org/mailman/listinfo/python-list
TypeError: loadtxt() got an unexpected keyword argument 'max_rows'
Hi, 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 UCvol = np.loadtxt(outputtransfile,skiprows=26,max_rows=1,usecols=[1]) TypeError: loadtxt() got an unexpected keyword argument 'max_rows' How could fix it? I attacched my files https://drive.google.com/file/d/1PgOcuEMFsaAuKTsbU0i0gwg04mDCJJoK/view?usp=sharing https://drive.google.com/file/d/13E7vcGQtrOS1lw9RupGThGQ2vSGRfTFG/view?usp=sharing https://drive.google.com/file/d/1Z6GKYtHthAyPO3wFHUFK10QweRpclu29/view?usp=sharing regard Alberto -- https://mail.python.org/mailman/listinfo/python-list