LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
GregSands

Array Reshape on the In Place Element Structure

Status: New

There are many array functions that don't need to depend on the dimensionality of the array - for example most of those in the "Probability & Statistics" menu (Mean, Median, Std Deviation etc) and some in the Signal Operation (like Scale, Normalize).  But if I want to use one on a 3D array, I must first make a copy by reshaping to a 1D array, which can be very memory-expensive.  I'd like a node on the "In Place Element Structure" which accepts an array of any dimension, and makes the data available as a 1D array of that type.

 

I've suggested a similar idea before here, but perhaps I made it too complicated to receive any comments!  I keep running into this problem, so lets try again.  Smiley Happy

 

3 Comments
GregSands
Active Participant

Here's a mock-up image to show what I mean:

Array Reshape.png

AristosQueue (NI)
NI Employee (retired)

I checked with array primitive developers. This idea seems viable. Doing such an inplace operation using a subarray isn't viable in general for the Reshape Array prim when going from 1D to 2D because of the possible need for padding or trimming, but within the context of an inplace element structure, this seems viable.

GregSands
Active Participant

Great!  I only ever had in mind treating high-dimensional arrays as 1D, not the other way around - so not a general replace for Reshape Array.

 

Now it sounds like this needs just another 298 Kudos to make it across the line 🙂