[Numpy-discussion] Core math library in numpy

Charles R Harris charlesr.harris@gmail....
Thu Feb 19 12:41:58 CST 2009


On Thu, Feb 19, 2009 at 9:32 AM, David Cournapeau <cournape@gmail.com>wrote:

> On Fri, Feb 20, 2009 at 12:16 AM, David Cournapeau <cournape@gmail.com>
> wrote:
> > On Sun, Feb 15, 2009 at 5:09 PM, Robert Kern <robert.kern@gmail.com>
> wrote:
> >> On Sun, Feb 15, 2009 at 01:48, David Cournapeau
> >> <david@ar.media.kyoto-u.ac.jp> wrote:
> >>
> >>> Would people be against this ?
> >>
> >> Not I.
> >
> > Ok, I have started this in the coremath branch - it solves the warning
> > issues we got since the merge of formatting stuff. I tested it on
> > Linux, windows (both mingw and VS - still need to test on Win64)
>
> Surprisingly, it worked out of the box on win64 (with python 2.6).
> There are some errors, but totally unrelated to the changes. That
> alone is enough of an argument for inclusion IMO - those compiler
> crashes were driving me crazy,
>

I think this is a bit obfuscated:

--- branches/coremath/numpy/core/code_generators/generate_umath.py
 2009-02-19 11:45:30 UTC (rev 6417)
+++ branches/coremath/numpy/core/code_generators/generate_umath.py
 2009-02-19 11:46:09 UTC (rev 6418)
@@ -37,7 +37,7 @@
            self.out = self.type * nout
        assert len(self.out) == nout

-_fdata_map = dict(f='%sf', d='%s', g='%sl',
+_fdata_map = dict(f='npy_%sf', d='npy_%s', g='npy_%sl',
                  F='nc_%sf', D='nc_%s', G='nc_%sl')
 def build_func_data(types, f):
    func_data = []---
branches/coremath/numpy/core/code_generators/generate_umath.py
     2009-02-19 11:45:30 UTC (rev 6417)
+++ branches/coremath/numpy/core/code_generators/generate_umath.py
 2009-02-19 11:46:09 UTC (rev 6418)
@@ -37,7 +37,7 @@
            self.out = self.type * nout
        assert len(self.out) == nout

-_fdata_map = dict(f='%sf', d='%s', g='%sl',
+_fdata_map = dict(f='npy_%sf', d='npy_%s', g='npy_%sl',
                  F='nc_%sf', D='nc_%s', G='nc_%sl')
 def build_func_data(types, f):
    func_data = []


I think it better to make the npy_* explicit in the TD constructor calls.
That way folks don't have to dig through the code to discover where the
magic npy came from.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20090219/6da4bb6d/attachment.html 


More information about the Numpy-discussion mailing list