umvarma / pynastran

Automatically exported from code.google.com/p/pynastran
1 stars 0 forks source link

coordinate system T method broken #151

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What is the expected output? What do you see instead?

Expected output is the transformation matrix (from the specified coordinate 
system to basic rectangular).

The actual output is:

Traceback (most recent call last):
  File "test.py", line 9, in <module>
    c.T()
  File "C:\Anaconda\lib\site-packages\pynastran-0.7.0_dev-py2.7.egg\pyNastran\bdf\cards\coordinateSystems.py", line 314,
 in T
    t[0:2, 0:2] = matrix
ValueError: could not broadcast input array from shape (3,3) into shape (2,2)

This looks like a simple index error. However, will the underlying code produce 
the desired transformation once that index error is fixed? Is there another way 
to get the transformation I'm looking for?

What steps will reproduce the problem?
1. run the attached script test.py with the deck test.dat in the same folder.

What version of the product are you using? On what operating system?  

r2047 on Windows 7.

Original issue reported on code.google.com by jeffrey....@gmail.com on 19 Jun 2014 at 1:48

Attachments:

GoogleCodeExporter commented 9 years ago
The proper way to set a matrix is

t[0:2, 0:2] = matrix[0:2, 0:2]

Original comment by mesheb82 on 19 Jun 2014 at 4:40