Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[ANN] NumPy 1.0b4 now available

6 views
Skip to first unread message

Travis E. Oliphant

unread,
Aug 26, 2006, 5:44:34 AM8/26/06
to pytho...@python.org
The 4th beta release of NumPy 1.0 has just been made available.

NumPy 1.0 represents the culmination of over 18 months of work to unify
the Numeric and Numarray array packages into a single best-of-breed
array package for Python.

NumPy supports all the features of Numeric and Numarray with a healthy
dose of it's own improved features.

It's time to start porting your applications to use NumPy as Numeric is
no longer maintained and Numarray will only be maintained for a few more
months.

Porting is not difficult especially using the compatibility layers
numpy.oldnumeric and numpy.numarray and the alter_code1.py modules in
those packages. The full C-API of Numeric is supported as is the C-API
of Numarray.

More information is available at http://numpy.scipy.org


NumPy Developers

bruce.who.hk

unread,
Aug 28, 2006, 2:48:37 AM8/28/06
to Travis E. Oliphant, pytho...@python.org
Hi, Travis

I just wonder if NumPy 1.0b4 can get along with py2exe? Just a few weeks ago I made a application in Python. At first I used Numpy, it works OK, but I cannot pack it into a workable executable with py2exe and the XXX.log saied that numpy cannot find some module. I found some hints in py2exe wiki, but it still doesn't work. At Last I tried Numeric instead and it got OK. I just hope that you donnot stop the maintenance of Numeric before you are sure that Numpy can work with py2exe.

-------------------------------------------------------------
> 发件人:Travis E. Oliphant
> 发送日期:2006-08-26 17:45:03
> 主题:[ANN] NumPy 1.0b4 now available
>--
>http://mail.python.org/mailman/listinfo/python-list

------------------
bruce.who.hk
2006-08-28

Bruce Who

unread,
Aug 29, 2006, 2:03:10 AM8/29/06
to Travis Oliphant, numpy-di...@lists.sourceforge.net, pytho...@python.org
Hi, Travis

I can pack my scripts into an executable with py2exe, but errors occur
once it runs:

No scipy-style subpackage 'random' found in D:\test\dist\numpy.
Ignoring: No module named info
import core -> failed: No module named _internal
import lib -> failed: 'module' object has no attribute '_ARRAY_API'
import linalg -> failed: 'module' object has no attribute '_ARRAY_API'
import dft -> failed: 'module' object has no attribute '_ARRAY_API'
Traceback (most recent call last):
File "main.py", line 9, in ?
File "numpy\__init__.pyc", line 49, in ?

File "numpy\add_newdocs.pyc", line 2, in ?
gkDc
File "numpy\lib\__init__.pyc", line 5, in ?

File "numpy\lib\type_check.pyc", line 8, in ?

File "numpy\core\__init__.pyc", line 6, in ?

File "numpy\core\umath.pyc", line 12, in ?

File "numpy\core\umath.pyc", line 10, in __load

AttributeError: 'module' object has no attribute '_ARRAY_API'


This is the main.py file:
#=======================================
# filename:main.py
import wx
import numpy

class myFrame(wx.Frame):
def __init__(self, *args, **kwds):
wx.Frame.__init__(self, *args, **kwds)
##------ your widgets
##------ put stuff into sizer
self.sizer_ = wx.BoxSizer(wx.VERTICAL)
## self.sizer_.Add(your_ctrl, proportion = 1, flag = wx.EXPAND)

## apply sizer
self.SetSizer(self.sizer_)
self.SetAutoLayout(True)

def main(): ## {{{
app = wx.PySimpleApp(0)
frame = myFrame(None, -1, title = '')
frame.Show(True)
app.SetTopWindow(frame)
app.MainLoop()
## }}}

if __name__ == "__main__":main()
#=======================================
# filename:setup.py
import glob
import sys

from distutils.core import setup
import py2exe

includes = ["encodings",
"encodings.*",
]

excludes = ["javax.comm"]

options = {
"py2exe":
{
#"compressed": 1,
#"optimize": 0,
#"bundle_files":2,
"skip_archive":1,
"includes": includes,
'excludes': excludes
}
}

setup(
version = "0.1",
description = "",
name = "test",
options = options,
windows = [
{
"script":"main.py",
}
],
#zipfile = None,
)


and I run this command to compile the scripts:
python setup.py py2exe

and all packages I use are:
python2.4.3
numpy-0.98
py2exe-0.6.5
wxpython-2.6.3.2

I unistalled Numeric before I compiled scripts.

If you google "numpy py2exe", you can find others guys stumbled by the
same issue with ease:

http://aspn.activestate.com/ASPN/Mail/Message/py2exe-users/3249182
http://www.nabble.com/matplotlib,-numpy-and-py2exe-t1901429.html

I just hope this can be fixed in the next table release of numpy.

On 8/29/06, Travis Oliphant <oliphan...@ieee.org> wrote:


> bruce.who.hk wrote:
> > Hi, Travis
> >
> > I just wonder if NumPy 1.0b4 can get along with py2exe? Just a few weeks ago I made a application in Python. At first I used Numpy, it works OK, but I cannot pack it into a workable executable with py2exe and the XXX.log saied that numpy cannot find some module. I found some hints in py2exe wiki, but it still doesn't work. At Last I tried Numeric instead and it got OK. I just hope that you donnot stop the maintenance of Numeric before you are sure that Numpy can work with py2exe.
> >

> We've already stopped maintenance of Numeric nearly 1 year ago. If
> NumPy doesn't work with py2exe then we need help figuring out why. The
> beta-release period is the perfect time to fix that. I've never used
> py2exe myself, but I seem to recall that some have been able to make it
> work.
>
> The problem may just be listing the right set of modules to carry along
> because you may not be able to get that with just the Python-side
> imports. Post any errors you receive to
> numpy-di...@lists.sourceforge.net
>
> Thanks,
>
>
> -Travis
>
>


Bruce Who

mensa...@aol.com

unread,
Aug 29, 2006, 7:03:51 PM8/29/06
to

Travis E. Oliphant wrote:
> The 4th beta release of NumPy 1.0 has just been made available.
>
> NumPy 1.0 represents the culmination of over 18 months of work to unify
> the Numeric and Numarray array packages into a single best-of-breed
> array package for Python.
>
> NumPy supports all the features of Numeric and Numarray with a healthy
> dose of it's own improved features.

So how come this support doesn't extend to making a numpy
version of NumTuT?

>
> It's time to start porting your applications to use NumPy as Numeric is
> no longer maintained and Numarray will only be maintained for a few more
> months.

Which would be a good reason to convert NumTut.

>
> Porting is not difficult especially using the compatibility layers
> numpy.oldnumeric and numpy.numarray and the alter_code1.py modules in
> those packages.

Ah, I see. I'm supposed to convert it myself.

So when I place my cursor over the link and it identifies the
link as "alter_code1.py" meaning it's a Python source file,
naturally I download it only to discover that it's not a source
code file but an .html file masquerading as a .py file.

So when I followow the link and see some stupid management
system, I'm completely bewildered. What the fuck am I supposed
to do with this? Oh, wait...I can download in other formats.

Only the "Plain Text" format isn't plain text. It strips off the web
page stuff but doesn't translate the codes such as &lt; rendering
the alleged plain text un-runnable. Ok, I should have downloaded
"Original Format". Would it be too much trouble to explain all that?

Oh, and when you run alter_code1.py, it does not, in fact, alter
the code. After "altering", the NumTut files continue to complain
that there is no module named "Numeric". Pardon me, but wasn't
alter_code1.py supposed to fix that? I guess not. Of course, you
can guess what happened next. Manually changing "Numeric" to
"numpy" fixes the import problem but it still won't run, something
about "types" not being defined.

I give up. It looks like a complete waste of time.

> The full C-API of Numeric is supported as is the C-API
> of Numarray.
>
> More information is available at http://numpy.scipy.org

Like the statement

"There is a module called convertcode.py in NumPy that
can make the transition to NumPy easier (it will automatically
perform the search-and-replace style changes that need to
be made to python code that uses Numeric to make it work
with NumPy)."

Which is a lie, there is no such module included in numpy.
Is alter_code1.py supposed to take its place? If so why hasn't
the Home Page been updated to reflect this?

>
>
> NumPy Developers

And you have the GALL to CHARGE for the documentation!

Robert Kern

unread,
Aug 29, 2006, 7:58:47 PM8/29/06
to pytho...@python.org
mensa...@aol.com wrote:
> Travis E. Oliphant wrote:
>> The 4th beta release of NumPy 1.0 has just been made available.
>>
>> NumPy 1.0 represents the culmination of over 18 months of work to unify
>> the Numeric and Numarray array packages into a single best-of-breed
>> array package for Python.
>>
>> NumPy supports all the features of Numeric and Numarray with a healthy
>> dose of it's own improved features.
>
> So how come this support doesn't extend to making a numpy
> version of NumTuT?

Because NumTut has no redeeming value? Certainly none over this:

http://www.scipy.org/Numpy_Example_List

>> It's time to start porting your applications to use NumPy as Numeric is
>> no longer maintained and Numarray will only be maintained for a few more
>> months.
>
> Which would be a good reason to convert NumTut.

No. NumTut would still need to be *useful*.

>> Porting is not difficult especially using the compatibility layers
>> numpy.oldnumeric and numpy.numarray and the alter_code1.py modules in
>> those packages.
>
> Ah, I see. I'm supposed to convert it myself.
>
> So when I place my cursor over the link

What link?

> and it identifies the
> link as "alter_code1.py" meaning it's a Python source file,
> naturally I download it only to discover that it's not a source
> code file but an .html file masquerading as a .py file.
>
> So when I followow the link and see some stupid management
> system, I'm completely bewildered. What the fuck am I supposed
> to do with this? Oh, wait...I can download in other formats.
>
> Only the "Plain Text" format isn't plain text. It strips off the web
> page stuff but doesn't translate the codes such as &lt; rendering
> the alleged plain text un-runnable. Ok, I should have downloaded
> "Original Format". Would it be too much trouble to explain all that?

Why are you trying to download the file from the Trac source browser? Get it
from the real numpy source distribution.

> Oh, and when you run alter_code1.py, it does not, in fact, alter
> the code. After "altering", the NumTut files continue to complain
> that there is no module named "Numeric". Pardon me, but wasn't
> alter_code1.py supposed to fix that? I guess not. Of course, you
> can guess what happened next. Manually changing "Numeric" to
> "numpy" fixes the import problem but it still won't run, something
> about "types" not being defined.

Yup, that's a bug. Apparently we're not detecting "from Numeric import *". The
drop-in replacement for "Numeric" is not "numpy" but "numpy.oldnumeric".

Making that replacement at least gets me to a RuntimeError in Tkinter. Which is
exactly what I get with Numeric. Remember what I said about NumTut having no
redeeming value?

>> The full C-API of Numeric is supported as is the C-API
>> of Numarray.
>>
>> More information is available at http://numpy.scipy.org
>
> Like the statement
>
> "There is a module called convertcode.py in NumPy that
> can make the transition to NumPy easier (it will automatically
> perform the search-and-replace style changes that need to
> be made to python code that uses Numeric to make it work
> with NumPy)."
>
> Which is a lie, there is no such module included in numpy.
> Is alter_code1.py supposed to take its place? If so why hasn't
> the Home Page been updated to reflect this?

Are you volunteering to maintain the site? I'd be happy to set you up with access.

>> NumPy Developers
>
> And you have the GALL to CHARGE for the documentation!

No, he's charging for a book. It's not the only source of documentation out
there, you know.

http://www.scipy.org/Documentation

If you think the freely available material is lacking, please contribute.

--
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

mensa...@aol.com

unread,
Aug 29, 2006, 9:00:03 PM8/29/06
to
Robert Kern wrote:
> mensa...@aol.com wrote:
> > Travis E. Oliphant wrote:
> >> The 4th beta release of NumPy 1.0 has just been made available.
> >>
> >> NumPy 1.0 represents the culmination of over 18 months of work to unify
> >> the Numeric and Numarray array packages into a single best-of-breed
> >> array package for Python.
> >>
> >> NumPy supports all the features of Numeric and Numarray with a healthy
> >> dose of it's own improved features.
> >
> > So how come this support doesn't extend to making a numpy
> > version of NumTuT?
>
> Because NumTut has no redeeming value? Certainly none over this:
>
> http://www.scipy.org/Numpy_Example_List

Ok, it's just that when I go to the download page, I see

Latest File Releases

The latest file releases

Package Release Date Notes / Monitor Downloads
Numarray 1.5.2 August 24, 2006 - Download
Numeric 24.2 November 11, 2005 - Download
NumPy 1.0b4 July 21, 2006 - Download
tutorial NumTut August 14, 2001 - Download

which certainly makes no indication that NumTut has no redeeming value.
Even the Notes simply tell you to look at the Numeric documentation.
I hardly think that's good enough. It should bear a large red label:

WARNING! Not compatible with NumPy (and has no redeeming value)

>
> >> It's time to start porting your applications to use NumPy as Numeric is
> >> no longer maintained and Numarray will only be maintained for a few more
> >> months.
> >
> > Which would be a good reason to convert NumTut.
>
> No. NumTut would still need to be *useful*.

Then why are you floggin' the bloody thing?

>
> >> Porting is not difficult especially using the compatibility layers
> >> numpy.oldnumeric and numpy.numarray and the alter_code1.py modules in
> >> those packages.
> >
> > Ah, I see. I'm supposed to convert it myself.
> >
> > So when I place my cursor over the link
>
> What link?

This one (from Numpy Home Page):

<br />
Numeric
users should find the transition very easy.&nbsp; There is a <a

href="http://projects.scipy.org/scipy/numpy/browser/trunk/numpy/oldnumeric/alter_code1.py">module</a>
that can make most of the necessary changes to your Python code that
used Numeric to work with the new NumPy. <br />
<br />

>
> > and it identifies the
> > link as "alter_code1.py" meaning it's a Python source file,
> > naturally I download it only to discover that it's not a source
> > code file but an .html file masquerading as a .py file.
> >
> > So when I followow the link and see some stupid management
> > system, I'm completely bewildered. What the fuck am I supposed
> > to do with this? Oh, wait...I can download in other formats.
> >
> > Only the "Plain Text" format isn't plain text. It strips off the web
> > page stuff but doesn't translate the codes such as &lt; rendering
> > the alleged plain text un-runnable. Ok, I should have downloaded
> > "Original Format". Would it be too much trouble to explain all that?
>
> Why are you trying to download the file from the Trac source browser? Get it
> from the real numpy source distribution.

Because the Home Page told me to go there? That usually means it
isn't included in the distribution. I certainly wouldn't have gone to
all that trouble if I knew I already had it. The wording on the Home
Page implied I didn't, so I didn't look.

The best Quality Control is performed by someone who's completely
clueless.

Remember, the programmer only *thinks* he knows how it works.

>
> > Oh, and when you run alter_code1.py, it does not, in fact, alter
> > the code. After "altering", the NumTut files continue to complain
> > that there is no module named "Numeric". Pardon me, but wasn't
> > alter_code1.py supposed to fix that? I guess not. Of course, you
> > can guess what happened next. Manually changing "Numeric" to
> > "numpy" fixes the import problem but it still won't run, something
> > about "types" not being defined.
>
> Yup, that's a bug. Apparently we're not detecting "from Numeric import *". The
> drop-in replacement for "Numeric" is not "numpy" but "numpy.oldnumeric".
>
> Making that replacement at least gets me to a RuntimeError in Tkinter. Which is
> exactly what I get with Numeric. Remember what I said about NumTut having no
> redeeming value?

Fine. I'll discard it. Lucky for me I have no actual Numeric code to
convert.

>
> >> The full C-API of Numeric is supported as is the C-API
> >> of Numarray.
> >>
> >> More information is available at http://numpy.scipy.org
> >
> > Like the statement
> >
> > "There is a module called convertcode.py in NumPy that
> > can make the transition to NumPy easier (it will automatically
> > perform the search-and-replace style changes that need to
> > be made to python code that uses Numeric to make it work
> > with NumPy)."
> >
> > Which is a lie, there is no such module included in numpy.
> > Is alter_code1.py supposed to take its place? If so why hasn't
> > the Home Page been updated to reflect this?
>
> Are you volunteering to maintain the site?

Sure.

> I'd be happy to set you up with access.

And I'll be happy to change it. Say, remove the goofy links, direct
the users to look for the alter*.py programs in their distribution,
point out that NumTut has no redeeming value and cannot be converted
using alter*.py, so the user is on his own to make it work if he
really wants to try it? At this point, that's all I know about it.

>
> >> NumPy Developers
> >
> > And you have the GALL to CHARGE for the documentation!
>
> No, he's charging for a book. It's not the only source of documentation out
> there, you know.

Ok, I flew off the handle there. I realize you get what you pay for.
Not getting what you pay for irks me, however.

>
> http://www.scipy.org/Documentation
>
> If you think the freely available material is lacking, please contribute.

I'll be happy to, if I can.

It was I, after all, who found the memory leak bug in gmpy that's now
fixed. Unfortunately, there's been no reply to my second bug find and
given the issues with the last update, I despair of ever seeing another
Windows version, meaning I'll probably be stuck on Python 2.4 forever.

Travis E. Oliphant

unread,
Aug 30, 2006, 2:40:51 AM8/30/06
to pytho...@python.org, numpy-di...@lists.sourceforge.net
Bruce Who wrote:
> Hi, Travis
>
> I can pack my scripts into an executable with py2exe, but errors occur
> once it runs:

I suspect you need to force-include the numpy/core/_internal.py file by
specifying it in your setup.py file as explained on the py2exe site.
That module is only imported by the multiarraymodule.c file which I
suspect py2exe can't automatically discern.

In 1.0 we removed the package-loader issues which are probably giving
the scipy-style subpackage errors. So, very likely you might be O.K.
with the beta releases of 1.0 as long as you tell py2exe about
numpy/core/_internal.py so that it gets included in the distribution.

Please post any successes.

Best,

-Travis

Steve Holden

unread,
Aug 30, 2006, 2:56:38 AM8/30/06
to pytho...@python.org
mensa...@aol.com wrote:
> Robert Kern wrote:
>>mensa...@aol.com wrote:
[...]

>>>>The full C-API of Numeric is supported as is the C-API
>>>>of Numarray.
>>>>
>>>>More information is available at http://numpy.scipy.org
>>>
>>>Like the statement
>>>
>>>"There is a module called convertcode.py in NumPy that
>>>can make the transition to NumPy easier (it will automatically
>>>perform the search-and-replace style changes that need to
>>>be made to python code that uses Numeric to make it work
>>>with NumPy)."
>>>
>>>Which is a lie, there is no such module included in numpy.
>>>Is alter_code1.py supposed to take its place? If so why hasn't
>>>the Home Page been updated to reflect this?
>>
>>Are you volunteering to maintain the site?
>
> Sure.
[...]

Good for you!

The open source world *needs* to encourage more involvement from
(forgive me, but you imply the same yourself) "clueless" users. That
way, the software will become more widely available, as it won't speak
only to experienced developers.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

0 new messages