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

 
 

bug #44572: New methods for Varray

Submitted by:  francesco <francio>
Submitted on:  Wed 18 Mar 2015 03:55:26 PM UTC  
 
Category: CoreSeverity: 1 - Wish
Item Group: Feature requestStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

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>
Project 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>
Project 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>
Project 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>
Project 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>
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 francio (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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 27 May 2015 11:31:18 AM UTCbverhegStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Wed 18 Mar 2015 06:33:26 PM UTCbverhegStatusNone=>Ready For Test

    Back to the top


    Powered by Savane 3.1-cleanup1