How to store X-Y data in order to use the functions in Numpy?
<p>Both <strong>Numpy</strong> and <strong>Scipy</strong> have a number of useful functions for performing operations on data (i.e. integrating, Fourier transforms, baseline correction, etc.). However, I haven't seen documentation regarding the general form for inputing X-Y data into these functions. Say I have a spectrum of wavelength and absorbance values, or stress and strain data from a mechanical properties test.</p>

<p>Does one generally:</p>

<ol>
<li><p>Use two 1-D Numpy arrays, one for X, and one for Y?</p></li>
<li><p>Use one 2-D Numpy array, with X on one axis, and Y on the other?</p></li>
<li><p>Use a single <a href="https://stackoverflow.com/questions/15815999/is-there-a-standard-way-to-store-xy-data-in-python">structured array</a>?</p></li>
</ol>

<p>How does this change when you have XY-Z data?</p>

<p>What is the most general data structure for XY data that allows me to input my data directly into <em>most</em> of these functions without redefining how I store my data?</p>