bugpyFormex - Bugs: bug #37828, Coords methods x(), y(), z()...

 
 

bug #37828: Coords methods x(), y(), z() return wrong type

Submitted by:  gianluca de santis <gianlucadesi>
Submitted on:  Thu 29 Nov 2012 10:02:30 AM UTC  
 
Category: NoneSeverity: 4 - Important
Item Group: Functionality errorStatus: Fixed
Privacy: PublicAssigned to: Benedict Verhegghe <bverheg>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 04 Dec 2012 08:59:30 PM UTC, comment #2:

Since revision 2583, these methods return array types, not Coords.

Benedict Verhegghe <bverheg>
Project AdministratorIn charge of this item.
Thu 29 Nov 2012 03:39:16 PM UTC, comment #1:

In coords.py only def map(self,func) makes use of .x(), .y(), .z(). It still works fine.

I think this bug can be closed.

gianluca de santis <gianlucadesi>
Project Member
Thu 29 Nov 2012 10:02:30 AM UTC, original submission:

Coords methods x(),y(),z() return type 'coords.Coords' instead of type 'numpy.ndarray'

example:

C=Coords([[0., 0., 0.], [2., 0., 0.]])
Cx=C.x()

print (Cx)
print (type(Cx))

Cx2=asarray(C.x())
print (Cx2)
print (type(Cx2))

To fix it, I would insert the asarray function:

def x(self)
return asarray(self[...,0])

gianluca de santis <gianlucadesi>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bverheg (Posted a comment)
  • -unavailable- added by gianlucadesi (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 04 Dec 2012 08:59:30 PM UTCbverhegItem GroupNone=>Functionality error
      StatusWorks For Me=>Fixed
      Open/ClosedOpen=>Closed
    Thu 29 Nov 2012 03:39:16 PM UTCgianlucadesiStatusNone=>Works For Me

    Back to the top


    Powered by Savane 3.1-cleanup1