On 26 Aug 2014, at 09:05 pm, Adrian Altenhoff
wrote:
>> But you are right that the problem with using the first_values, which should
>> of course be valid,
>> somehow stems from the use of usecols, it seems that in that loop
>>
>>for (i, conv) in user_converters.items():
>>
>> i in user_c
Hi Derek,
> But you are right that the problem with using the first_values, which should
> of course be valid,
> somehow stems from the use of usecols, it seems that in that loop
>
> for (i, conv) in user_converters.items():
>
> i in user_converters and in usecols get out of sync. This cert
Hi Adrian,
>> not sure whether to call it a bug; the error seems to arise before reading
>> any actual data
>> (even on reading from an empty string); when genfromtxt is checking the
>> filling_values used
>> to substitute missing or invalid data it is apparently testing on default
>> testing v
Hi Derek,
thanks for your answer.
> not sure whether to call it a bug; the error seems to arise before reading
> any actual data
> (even on reading from an empty string); when genfromtxt is checking the
> filling_values used
> to substitute missing or invalid data it is apparently testing on def
Hi Adrian,
> I tried to load data from a csv file into numpy using genfromtxt. I need
> only a subset of the columns and want to apply some conversions to the
> data. attached is a minimal script showing the error.
> In brief, I want to load columns 1,2 and 4. But in the converter
> function for t
Hi,
I tried to load data from a csv file into numpy using genfromtxt. I need
only a subset of the columns and want to apply some conversions to the
data. attached is a minimal script showing the error.
In brief, I want to load columns 1,2 and 4. But in the converter
function for the 4th column, I
Hi,
On Wed, Mar 30, 2011 at 11:32 AM, Pauli Virtanen wrote:
> On Wed, 30 Mar 2011 10:37:45 -0700, Matthew Brett wrote:
> [clip]
>> imagine I'm working with a non-latin default encoding, and I've opened a
>> file:
>>
>> fobj = open('my_nonlatin.txt', 'rt')
>>
>> in python 3.2. That might contain
On Wed, 30 Mar 2011 10:37:45 -0700, Matthew Brett wrote:
[clip]
> imagine I'm working with a non-latin default encoding, and I've opened a
> file:
>
> fobj = open('my_nonlatin.txt', 'rt')
>
> in python 3.2. That might contain numbers and non-latin text. I can't
> pass that into 'genfromtxt' be
On Wed, Mar 30, 2011 at 7:37 PM, Matthew Brett wrote:
> Hi,
>
> On Wed, Mar 30, 2011 at 10:02 AM, Ralf Gommers
> wrote:
>> On Wed, Mar 30, 2011 at 3:39 AM, Matthew Brett
>> wrote:
>>> Hi,
>>>
>>> On Mon, Mar 28, 2011 at 11:29 PM, wrote:
numpy/lib/test_io.py only uses StringIO in the t
Hi,
On Wed, Mar 30, 2011 at 10:02 AM, Ralf Gommers
wrote:
> On Wed, Mar 30, 2011 at 3:39 AM, Matthew Brett
> wrote:
>> Hi,
>>
>> On Mon, Mar 28, 2011 at 11:29 PM, wrote:
>>> numpy/lib/test_io.py only uses StringIO in the test, no actual csv file
>>>
>>> If I give the filename than I get a
On Wed, Mar 30, 2011 at 3:39 AM, Matthew Brett wrote:
> Hi,
>
> On Mon, Mar 28, 2011 at 11:29 PM, wrote:
>> numpy/lib/test_io.py only uses StringIO in the test, no actual csv file
>>
>> If I give the filename than I get a TypeError: Can't convert 'bytes'
>> object to str implicitly
>>
>>
>>
Hi,
On Mon, Mar 28, 2011 at 11:29 PM, wrote:
> numpy/lib/test_io.py only uses StringIO in the test, no actual csv file
>
> If I give the filename than I get a TypeError: Can't convert 'bytes'
> object to str implicitly
>
>
> from the statsmodels mailing list example
>
> data = recfromtxt
numpy/lib/test_io.pyonly uses StringIO in the test, no actual csv file
If I give the filename than I get a TypeError: Can't convert 'bytes'
object to str implicitly
from the statsmodels mailing list example
data = recfromtxt(open('./star98.csv', "U"), delimiter=",", skip_header=1,
>>
On Jan 25, 2011, at 9:06 PM, Bruce Southey wrote:
> Your filling_values is zero so there is this line (1295?) in the code:
> user_filling_values = filling_values or []
>
> Which of cause presumes your filling_values is not something like 0 or [0].
That's the bug. I forgot that filling_values cou
On 01/25/2011 10:56 AM, Skipper Seabold wrote:
> On Tue, Jan 25, 2011 at 11:17 AM, Pierre GM wrote:
>> On Jan 24, 2011, at 11:47 PM, Skipper Seabold wrote:
>>
>>> Am I misreading the docs or missing something? Consider the following
>>> adapted from here:
>>> http://docs.scipy.org/doc/numpy/user/
On Tue, Jan 25, 2011 at 11:17 AM, Pierre GM wrote:
>
> On Jan 24, 2011, at 11:47 PM, Skipper Seabold wrote:
>
>> Am I misreading the docs or missing something? Consider the following
>> adapted from here:
>> http://docs.scipy.org/doc/numpy/user/basics.io.genfromtxt.html
>>
>> from StringIO import
On Jan 24, 2011, at 11:47 PM, Skipper Seabold wrote:
> Am I misreading the docs or missing something? Consider the following
> adapted from here:
> http://docs.scipy.org/doc/numpy/user/basics.io.genfromtxt.html
>
> from StringIO import StringIO
> import numpy as np
>
> data = "1, 2, 3\n4, ,5"
Am I misreading the docs or missing something? Consider the following
adapted from here:
http://docs.scipy.org/doc/numpy/user/basics.io.genfromtxt.html
from StringIO import StringIO
import numpy as np
data = "1, 2, 3\n4, ,5"
np.genfromtxt(StringIO(data), delimiter=",", names="a,b,c",
missing_va
With names=True, if you specify the dtype manually and specify
usecols, it doesn't grab the correct names along with the columns.
Should be a simple fix, but haven't had time to write a patch yet.
from stringIO import stringIO
import numpy as np
np.__version__
#1.5.0
s = StringIO("col0,col1,col2,c
19 matches
Mail list logo