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                     0.60

table 2:
wavelength          absorption
330                     0.45
331                     0.49
332                     0.52
333                     0.50
334                     0.48

Notice that the wavelength columns are the same so I can unite the tables
into one:

wavelength          absorption1          absorption1
330                     0.65                    0.45
331                     0.68                    0.49
332                     0.70                    0.52
333                     0.69                    0.50
334                     0.60                    0.48


On Sun, Nov 1, 2009 at 4:05 PM, MaxTheMouse <maxthemo...@googlemail.com>wrote:

>
>
>
> On Nov 1, 7:20 am, Yotam Avital <yota...@gmail.com> 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 <some magic function> b
> >
> > sage: out
> > array([[ 1.,  3. ,29],
> >          [ 2.,  0. ,21],
> >          [  3.,  10. ,-19]])
> >
> > On Sun, Nov 1, 2009 at 3:02 AM, Jason Grout <jason-s...@creativetrax.com
> >wrote:
> >
> >
> >
>
> You mean like this?
>
> sage: !cat file1 file2
> 1 3
> 2 0
> 3 10
> 1 29
> 2 21
> 3  -19
> sage: !cat file1 file2 > file3
> sage: a=numpy.loadtxt('file3')
> sage: print a
> [[  1.   3.]
>  [  2.   0.]
>  [  3.  10.]
>  [  1.  29.]
>  [  2.  21.]
>  [  3. -19.]]
>
> Cheers ~ Adam
> >
>

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to