ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> numpy-discussion
numpy-discussion
Re: [Numpy-discussion] Histograms of extremely large data sets
by Cameron Walsh other posts by this author
Dec 13 2006 5:32PM messages near this date
Re: [Numpy-discussion] Histograms of extremely large data sets | Re: [Numpy-discussion] Histograms of extremely large data sets
On 13/12/06, Cameron Walsh <cameron.walsh@[...].com>  wrote:
>  On 13/12/06, eric jones <eric@[...].com> wrote 290 lines of
>  awesome code and a fantastic explanation:
> 
>  > Hey Cameron,
>  >
>  > I wrote a simple weave based histogram function that should work for
>  > your problem.  It should work for any array input data type.  The needed
>  > files (and a few tests and examples) are attached.
[...]

Hi Eric,

I've ran test_weave_histogram.py and histogram_speed.py, but each one
seems to fail on calling typed_array_converter.declaration_code() as
follows:

Traceback (most recent call last):
  File "histogram_speed.py", line 26, in <module> 
    res2 = histogram(data, bins)
  File "/home/cameron/repos/wavesmaker/trunk/code/gui/process_modules/eric_histo/weave_histo
gram.py",
line 67, in histogram
    compiler='gcc')
  File "/usr/local/lib/python2.5/site-packages/scipy/weave/inline_tools.py",
line 339, in inline
    **kw)
  File "/usr/local/lib/python2.5/site-packages/scipy/weave/inline_tools.py",
line 447, in compile_function
    verbose=verbose, **kw)
  File "/usr/local/lib/python2.5/site-packages/scipy/weave/ext_tools.py",
line 353, in compile
    kw,file = self.build_kw_and_file(location,kw)
  File "/usr/local/lib/python2.5/site-packages/scipy/weave/ext_tools.py",
line 334, in build_kw_and_file
    file = self.generate_file(location=location)
  File "/usr/local/lib/python2.5/site-packages/scipy/weave/ext_tools.py",
line 295, in generate_file
    code = self.module_code()
  File "/usr/local/lib/python2.5/site-packages/scipy/weave/ext_tools.py",
line 203, in module_code
    self.function_code(),
  File "/usr/local/lib/python2.5/site-packages/scipy/weave/ext_tools.py",
line 269, in function_code
    all_function_code += func.function_code()
  File "/usr/local/lib/python2.5/site-packages/scipy/weave/inline_tools.py",
line 83, in function_code
    decl_code = indent(self.arg_declaration_code(),4)
  File "/usr/local/lib/python2.5/site-packages/scipy/weave/inline_tools.py",
line 62, in arg_declaration_code
    arg_strings.append(arg.declaration_code(inline=1))
  File "/home/cameron/repos/wavesmaker/trunk/code/gui/process_modules/eric_histo/typed_array
_converter.py",
line 18, in declaration_code
    code = super(typed_array_converter, self).declaration_code(templatize,
TypeError: super() argument 1 must be type, not classobj

I've tried this with Python2.4 and Python2.5 with the same results.

What do I need to change, since it seems to have worked for you but not for me.

Thanks and best regards,

Cameron.
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@[...].org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Thread:
Cameron Walsh
Rick White
Brian Granger
Eric Jones
Cameron Walsh
Rick White
Eric Jones
Cameron Walsh
Cameron Walsh
Eric Jones
Giorgio Luciano
Sven Schreiber
Christopher Barker
Cameron Walsh
Eric Jones

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved