Hi,
take a look at this...
http://www.scipy.org/Numpy_Example_List#head-12c005e9fff429abb657745defd2923dab55c62d
import numpy as np
a=np.array([[1,2],[3,4]])
b=np.array([[1,2],[5,6]])
a=np.append(a,[b[1]],axis=0)
a
Greets!
Stefan
On Nov 1, 3:28 pm, MaxTheMouse wrote:
> I should add the ref
I should add the reference. I found it on a scipy list:
http://osdir.com/ml/python.scientific.user/2003-07/msg00078.html
~adam
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to
Hi,
See http://mathesaurus.sourceforge.net/matlab-numpy.html for
concatenate commands etc.
c = numpy.concatenate((a,b), axis=1)
is not exactly what you want but should help although you have a
repeat of the first column. The following is untested but might help.
def remove(arr, index, dim=0):
No, in your solution you simply merge the files into two long columns. What
I want is to create a table of data say those are my tables:
table 1:
wavelength absorption
330 0.65
331 0.68
332 0.70
333 0.69
334
Sorry,
I wasn't paying attention. I have a massive fever today. You want to
add a column. I am thinking a slice operation should work.
Adam
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, s
On Nov 1, 7:20 am, Yotam Avital wrote:
> This is not what I want.
>
> sage: !cat file1
> 1 3
> 2 0
> 3 10
> sage: !cat file2
> 1 29
> 2 21
> 3 -19
> sage: a=numpy.loadtxt('file1')
> sage: b=numpy.loadtxt('file2')
>
> sage: out = a b
>
> sage: out
> array([[ 1., 3. ,29],
> [ 2., 0.
This is not what I want.
sage: !cat file1
1 3
2 0
3 10
sage: !cat file2
1 29
2 21
3 -19
sage: a=numpy.loadtxt('file1')
sage: b=numpy.loadtxt('file2')
sage: out = a b
sage: out
array([[ 1., 3. ,29],
[ 2., 0. ,21],
[ 3., 10. ,-19]])
On Sun, Nov 1, 2009 at 3:02 AM, Jason
yotama9 wrote:
> Hello.
>
> I have several files of data that I want to merge into a single array
> and then manipulate it (adding a single column to all the column
> etc.)
>
> Each file is constructed of two columns. I want to take the columns of
> the first file and add to the the second colum
On Sat, Oct 31, 2009 at 3:05 PM, yotama9 wrote:
>
> Hello.
>
> I have several files of data that I want to merge into a single array
> and then manipulate it (adding a single column to all the column
> etc.)
>
> Each file is constructed of two columns. I want to take the columns of
> the first fi