[SciPy-Dev] stats._support.adm() dos not seem to like string values

Vincent Davis vincent at vincentdavis.net
Fri Jul 2 17:27:14 EDT 2010


On Fri, Jul 2, 2010 at 3:22 PM,  <josef.pktd at gmail.com> wrote:
> On Fri, Jul 2, 2010 at 3:25 PM, Vincent Davis <vincent at vincentdavis.net> wrote:
>>>>> y
>> array([['1', '2', 't'],
>>       ['1', '3', '3']],
>>      dtype='|S8')
>>>>> s.adm(y, 'x[1]=='2'')
>> Traceback (most recent call last):
>>  File "<string>", line 1, in <fragment>
>> invalid syntax: <string>, line 1, pos 18
>
> That's invalid syntax in your string
>
>>>> stats._support.adm(y, "x[1]=='2'")
> array([['1', '2', 't']],
>      dtype='|S8')
>
> use single quote inside double quote or the other way around.

Rather obvious mistake, I don't care for the how the criterion is
formatted so I let my bias get in the way.
Vincent
>
> Josef
>
>
>>
>> The documentation is very lacking, My question is should the ability
>> to handle string be added/fixed or should the docs specify numbers
>> only.
>>
>> Also I think the criterion should be improved accept "x[1]" or in the
>> above example "y[1]" really it could accept anything as the "x" has
>> not real meaning in the criterion
>>
>> Suggestion/comments
>>
>> Vincent
>> _______________________________________________
>> SciPy-Dev mailing list
>> SciPy-Dev at scipy.org
>> http://mail.scipy.org/mailman/listinfo/scipy-dev
>>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
>



More information about the SciPy-Dev mailing list