Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

poor categorical support w/ numpy<1.8 #7988

Closed
@story645

Description

@story645

Numpy versions < 1.8 play poorly with arrays of mixed type, truncating anything not of type string to the length of the longest string. This is inhibiting#7974

So the issue is as follows

>>>importnumpyasnp>>>np.__version__'1.7.1'>>>np.array(['A','A',np.nan,'B',-np.inf,3.14],dtype=np.unicode)array([u'A',u'A',u'n',u'B',u'-',u'3'],dtype='<U1')

two possible solutions:

  1. Fold back in shims removed inRemove numpy 1.6 specific work-arounds #7484 that existed mainly to solve this problem
  2. throw a warning if category.py is imported with a numpy<1.8 and skip tests for numpy<1.8

The advantage of 2 is it keeps the code cleaner and this is an edge case of sorts because it's only an issue when the array is of mixed type (strings and numbers). The advantage of 1 is of course edge case support on older systems.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp