bugpyFormex - Bugs: bug #44572, New methods for Varray

 
 

bug #44572: New methods for Varray

Submitter:  francesco <francio>
Submitted:  Wed 18 Mar 2015 03:55:26 PM UTC
   
 
Category:  Core Severity:  1 - Wish
Item Group:  Feature request Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 18 Mar 2015 06:33:26 PM UTC, comment #4: 

I think it is indeed better to let split return only the arrays.
I have changed it in this way in 425458f.

A separate method sameLength is provided, that returns unique lengths and corresponding row indices. This is actually used in the split method. This method also provides a way to get the list of shapes of the arrays, without constructing them.


Benedict Verhegghe <bverheg>
Group administrator
Wed 18 Mar 2015 06:15:31 PM UTC, comment #3: 

The split function has been added in commit a6e57ed. it returns the list of tuples (array,index). Should we modify it to add return_index to let the user choose if the index has to be returned?

francesco <francio>
Group Member
Wed 18 Mar 2015 04:47:13 PM UTC, comment #2: 

1. ok

2. shapes would return the shapes of the arrays as they were split. It is convenient to have an quick overview of what is inside the varray
e.g. if I have an array
Va=Varray([[0],[1,2],[1,4],[0,2]])
Va.shapes() will return (1,1),(3,2)

3 I ll make it as you said



francesco <francio>
Group Member
Wed 18 Mar 2015 04:30:06 PM UTC, comment #1: 

Can you elaborate somewhat more onthese items, because they are not clear to me.

1. if equivalent, why add a new method? Just use unique()

2. what is all array shapes?, what is group by columns?

3. split: If I understand correctly, you want to split into arrays depending on the row length? That seems useful. Go ahead with this. It should probably return a list of (array,index) tuples, where index has the original row numbers containd in array?






Benedict Verhegghe <bverheg>
Group administrator
Wed 18 Mar 2015 03:55:26 PM UTC, original submission:  

I would like to have some methods of Varray (names to decide),

1 unique_lengths (widths ) which will be equivalent to unique(lengths)

2 shapes all array shapes grouped by columns

3 split split the varray into all arrays of similar shape, maybe returning with the original position in the Varray

Can I start this?

francesco <francio>
Group Member

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-05-27 bverheg StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2015-03-18 bverheg StatusNone Ready For Test

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code