Skip to content

2D text wave should reshape order='f' #25

Description

@jbemis99

text3.zip
from igor pro:
•print text3[0][1]
tiger
•print text3[1][1]
wolf
•print text3[1][0]
dog
•print text3
text3[0][0]= {"cat","dog","fish"}
text3[0][1]= {"tiger","wolf","shark"}

Image

pip show igor2
Name: igor2
Version: 0.5.12

from igor2

In [1]: import igor2.binarywave as igor
In [2]: text3 = igor.load('text3.ibw')

In [3]: text3['wave']['wData'][0][1]
Out[3]: b'dog'

In [4]: text3['wave']['wData'][1][1]
Out[4]: b'tiger'

In [5]: text3['wave']['wData'][1][0]
Out[5]: b'fish'

In [6]: text3['wave']['wData']
Out[6]:
array([[b'cat', b'dog'],
[b'fish', b'tiger'],
[b'wolf', b'shark']], dtype='|S5')

where if you change line 602 of binarywave.py to be:
wdata = wdata.reshape(shape,order='f')

it works as expected:
In [5]: text3['wave']['wData'][0][1]
Out[5]: b'tiger'

In [6]: text3['wave']['wData'][1][1]
Out[6]: b'wolf'

In [7]: text3['wave']['wData'][1][0]
Out[7]: b'dog'

In [8]: text3['wave']['wData']
Out[8]:
array([[b'cat', b'tiger'],
[b'dog', b'wolf'],
[b'fish', b'shark']], dtype='|S5')

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions