numeric/numpy/numarray

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bryan

    #1

    numeric/numpy/numarray

    hi,

    what is the difference among numeric, numpy and numarray? i'm going to start
    using matplotlib soon and i'm not sure which one i should use.


    this page says, "Numarray is a re-implementation of an older Python array module
    called Numeric"
    The Space Telescope Science Institute helps humanity explore the universe with advanced space telescopes and ever-growing data archives.


    this page says, "NumPy derives from the old Numeric code base and can be used as
    a replacement for Numeric."


    i looked at the matplotlib examples today and if i remember correctly, the
    examples didn't use numarray.

    so i'm a bit confused.

    thanks,

    bryan

  • Simon Percivall

    #2
    Re: numeric/numpy/numarray


    Bryan wrote:[color=blue]
    > hi,
    >
    > what is the difference among numeric, numpy and numarray? i'm going to start
    > using matplotlib soon and i'm not sure which one i should use.
    >
    >
    > this page says, "Numarray is a re-implementation of an older Python array module
    > called Numeric"
    > http://www.stsci.edu/resources/softw...dware/numarray
    >
    > this page says, "NumPy derives from the old Numeric code base and can be used as
    > a replacement for Numeric."
    > http://numeric.scipy.org/
    >
    > i looked at the matplotlib examples today and if i remember correctly, the
    > examples didn't use numarray.
    >
    > so i'm a bit confused.
    >
    > thanks,
    >
    > bryan[/color]

    Look again at numeric.scipy.o rg, and this time: read the whole page,
    especially the section called "Older Array Packages".

    Comment

    • Ben Sizer

      #3
      Re: numeric/numpy/numarray

      Simon Percivall wrote:[color=blue]
      > Bryan wrote:[color=green]
      > > hi,
      > >
      > > what is the difference among numeric, numpy and numarray? i'm going to start
      > > using matplotlib soon and i'm not sure which one i should use.[/color]
      >
      > Look again at numeric.scipy.o rg, and this time: read the whole page,
      > especially the section called "Older Array Packages".[/color]

      In particular, ignore any references to SciPy Core... Not to mention
      anything regarding older NumPy, which is nothing to do with newer
      NumPy, which is why common libraries (such as PyOpenGL) ask for NumPy
      v23 when the latest download on SourceForge is 0.9.8.

      Numeric libraries in Python are a nomenclatural nightmare. It's well
      past time that something made it into the standard library, I feel.

      --
      Ben Sizer

      Comment

      • Bryan

        #4
        Re: numeric/numpy/numarray

        Simon Percivall wrote:[color=blue]
        > Bryan wrote:[color=green]
        >> hi,
        >>
        >> what is the difference among numeric, numpy and numarray? i'm going to start
        >> using matplotlib soon and i'm not sure which one i should use.
        >>
        >>
        >> this page says, "Numarray is a re-implementation of an older Python array module
        >> called Numeric"
        >> http://www.stsci.edu/resources/softw...dware/numarray
        >>
        >> this page says, "NumPy derives from the old Numeric code base and can be used as
        >> a replacement for Numeric."
        >> http://numeric.scipy.org/
        >>
        >> i looked at the matplotlib examples today and if i remember correctly, the
        >> examples didn't use numarray.
        >>
        >> so i'm a bit confused.
        >>
        >> thanks,
        >>
        >> bryan[/color]
        >
        > Look again at numeric.scipy.o rg, and this time: read the whole page,
        > especially the section called "Older Array Packages".
        >[/color]

        at the end of that page, it says:

        "Numarray is another implementation of an arrayobject for Python written after
        Numeric and before NumPy. Sponsors of numarray have indicated they will be
        moving to NumPy as soon as is feasible for them so that eventually numarray will
        be phased out."


        on the python wiki
        "NumArray is the current reimplementatio n of NumPy."


        so, was Numarray written *before* NumPY, or was it a reimplementatio n of NumPy
        which implies it came *after* NumPy? it seems clear that Numeric is the old one
        and i read is not being worked on anymore. so that leaves Numarray and numpy.
        which of these two should i use?

        thanks,

        bryan



        Comment

        • Ben Sizer

          #5
          Re: numeric/numpy/numarray


          Bryan wrote:
          [color=blue]
          > at the end of that page, it says:
          >
          > "Numarray is another implementation of an arrayobject for Python written after
          > Numeric and before NumPy. Sponsors of numarray have indicated they will be
          > moving to NumPy as soon as is feasible for them so that eventually numarray will
          > be phased out."
          >
          >
          > on the python wiki
          > "NumArray is the current reimplementatio n of NumPy."
          > http://wiki.python.org/moin/NumArray
          >
          > so, was Numarray written *before* NumPY, or was it a reimplementatio n of NumPy
          > which implies it came *after* NumPy? it seems clear that Numeric is the old one
          > and i read is not being worked on anymore. so that leaves Numarray and numpy.
          > which of these two should i use?[/color]

          Bryan,

          NumPy is the name of both an old package and a new package. I believe
          that NumArray came after the first incarnation, but that the new
          incarnation of NumPy is the most recent, and is probably the one you
          want.

          --
          Ben Sizer

          Comment

          • Bryan

            #6
            Re: numeric/numpy/numarray

            Ben Sizer wrote:[color=blue]
            > Bryan wrote:
            >[color=green]
            >> at the end of that page, it says:
            >>
            >> "Numarray is another implementation of an arrayobject for Python written after
            >> Numeric and before NumPy. Sponsors of numarray have indicated they will be
            >> moving to NumPy as soon as is feasible for them so that eventually numarray will
            >> be phased out."
            >>
            >>
            >> on the python wiki
            >> "NumArray is the current reimplementatio n of NumPy."
            >> http://wiki.python.org/moin/NumArray
            >>
            >> so, was Numarray written *before* NumPY, or was it a reimplementatio n of NumPy
            >> which implies it came *after* NumPy? it seems clear that Numeric is the old one
            >> and i read is not being worked on anymore. so that leaves Numarray and numpy.
            >> which of these two should i use?[/color]
            >
            > Bryan,
            >
            > NumPy is the name of both an old package and a new package. I believe
            > that NumArray came after the first incarnation, but that the new
            > incarnation of NumPy is the most recent, and is probably the one you
            > want.
            >[/color]

            thanks ben,

            i'll use NumPy then. just wish it was clear and obvious which one to use so i
            wouldn't have had to ask this question here.

            bryan

            Comment

            • John Hunter

              #7
              Re: numeric/numpy/numarray

              >>>>> "Bryan" == Bryan <belred@gmail.c om> writes:

              Bryan> hi, what is the difference among numeric, numpy and
              Bryan> numarray? i'm going to start using matplotlib soon and i'm
              Bryan> not sure which one i should use.

              numpy is the successor to numarray and Numeric. All three do
              basically the same thing. You should use numpy.

              matplotlib works with all three, you just need to be sure to set your
              "numerix" setting to "numpy" in your matplotlibrc file.

              numerix : numpy # numpy, Numeric or numarray

              On unix like OSes, this file is placed in ~/.matplotlib. On windows
              systems, it is usually found in C:\Documents and
              Settings\yourna me\.matplotlib

              JDH

              Comment

              • Dan Christensen

                #8
                Re: numeric/numpy/numarray

                Bryan <belred@gmail.c om> writes:
                [color=blue]
                > on the python wiki
                > "NumArray is the current reimplementatio n of NumPy."
                > http://wiki.python.org/moin/NumArray
                >
                > so, was Numarray written *before* NumPY, or was it a reimplementatio n of NumPy
                > which implies it came *after* NumPy?[/color]

                I clarified that wiki page to use the name "Numeric" for the old
                version, and to point out that there is "Numpy" which is even newer
                than numarray.

                Dan

                Comment

                • Alex Martelli

                  #9
                  Re: numeric/numpy/numarray

                  Bryan <belred@gmail.c om> wrote:
                  ...[color=blue]
                  > so, was Numarray written *before* NumPY, or was it a reimplementatio n of
                  > NumPy which implies it came *after* NumPy? it seems clear that Numeric is
                  > the old one and i read is not being worked on anymore. so that leaves
                  > Numarray and numpy. which of these two should i use?[/color]

                  I'll voice a heretic thought: me, I'm sticking with good old Numeric
                  until the situation with the newer packages settles down. Yes, Numeric
                  is not being developed any more, but to me that also means it won't
                  "change under me" and break something... and, it serves my personal
                  computational needs until something equally stable finally arrives. (Of
                  course, if and when I hit some bug in Numeric that will never be solved,
                  or need some other add-on package which in turn demands a different
                  numeric-array-computation underpinning, I'll have to change, but, so
                  far, I have not found myself in either of these situations).


                  Alex

                  Comment

                  • Terry Reedy

                    #10
                    Re: numeric/numpy/numarray


                    "Alex Martelli" <aleax@mac.comw rote in message
                    news:1hgwwnm.lh pxrs1gkfp6N%ale ax@mac.com...
                    I'll voice a heretic thought: me, I'm sticking with good old Numeric
                    until the situation with the newer packages settles down.
                    Not much of a heresy, I think. The numpy site recommends that *new* users
                    start with numpy but I don't remember the numeric/numpy folks recommending
                    that happy, experienced numeric users dump it yet. The current development
                    version of numpy is still labelled as a development version (0.9.8, I
                    believe) and besides bug fixes, it still made a few tweeks in the user
                    interface and C-API from the previous version. They are aiming to release
                    a stable NumPy 1.0 by the end of the summer. Then maybe they will start
                    pushing it, along with a compatible array interface for Python.

                    Terry Jan Reedy



                    Comment

                    • Robert Kern

                      #11
                      Re: numeric/numpy/numarray

                      Terry Reedy wrote:
                      "Alex Martelli" <aleax@mac.comw rote in message
                      news:1hgwwnm.lh pxrs1gkfp6N%ale ax@mac.com...
                      >I'll voice a heretic thought: me, I'm sticking with good old Numeric
                      >until the situation with the newer packages settles down.
                      >
                      Not much of a heresy, I think. The numpy site recommends that *new* users
                      start with numpy but I don't remember the numeric/numpy folks recommending
                      that happy, experienced numeric users dump it yet. The current development
                      version of numpy is still labelled as a development version (0.9.8, I
                      believe) and besides bug fixes, it still made a few tweeks in the user
                      interface and C-API from the previous version. They are aiming to release
                      a stable NumPy 1.0 by the end of the summer. Then maybe they will start
                      pushing it, along with a compatible array interface for Python.
                      My tactic in answering Numeric questions on this list has been to give the numpy
                      answer if the asker seems new to the field and give the Numeric answer *and* the
                      (obviously superior) numpy answer otherwise.

                      But that's mostly my natural politeness and tact (quit laughing. I can hear you
                      sniggering back there!). We definitely *do* want old hands at Numeric to give
                      numpy a try now. It's difficult to find the bugs, work out the transition
                      headaches, and make the right design decisions without feedback from you.

                      We are trying to get out a 1.0b1 in a couple of weeks. Hopefully, we can get to
                      1.0b2 by the SciPy conference in mid-August. If you've been holding off on
                      trying numpy, the 1.0 betas will be the perfect time to jump in. It will also be
                      your last chance to get your 2 cents in.

                      --
                      Robert Kern

                      "I have come to believe that the whole world is an enigma, a harmless enigma
                      that is made terrible by our own mad attempt to interpret it as though it had
                      an underlying truth."
                      -- Umberto Eco

                      Comment

                      Working...