deads / scipy-cluster

Automatically exported from code.google.com/p/scipy-cluster
Other
0 stars 0 forks source link

numpy float32 array are handled incorrectly #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Feed a float32 array into pdist

no errors are raised, but pdist returns an array with meaningless results.

What is the expected output? What do you see instead?
scipy-cluster should
 - upgrade float32 to float64 or use float32 nativly

What version of the product are you using? On what operating system?
 hcluster-0.1.4 on linux compiled from source

Cheers,
Marcin

Original issue reported on code.google.com by marcin.c...@gmail.com on 19 Mar 2008 at 9:03

GoogleCodeExporter commented 9 years ago
Thanks for the bug report. Sorry if I've caused unnecessary frustration. I've 
started
templating my code in C++ but that's far from being ready. I have a paper due 
in a
few hours so I will hold off on trying to finish that effort.

For the time being, I throw an error. The fix is checked into SVN. You should 
see a
release soon.

Thanks again,

Damian

Original comment by damian.e...@gmail.com on 20 Mar 2008 at 3:27

GoogleCodeExporter commented 9 years ago
Fixed and new release has been cut.

Damian Eads

Original comment by damian.e...@gmail.com on 20 Mar 2008 at 3:33

GoogleCodeExporter commented 9 years ago
Thanks for this ultra-fast fix, 
type-checking in the new version works for me.

btw. your code could be used as a tutorial on how to interface C/numpy/python.

Marcin

Original comment by marcin.c...@gmail.com on 20 Mar 2008 at 4:55

GoogleCodeExporter commented 9 years ago
Thanks! You'll notice the C code is separated into two functions, cluster.c and
cluster_wrap.c. I preferred this design in case I wanted to interface the
implementation with other languages.

I originally wrote this package strictly for my own research. Now that I've 
released
it to the public, I'd like to know how others are using it so I can get some 
ideas on
how to improve it. Please send me a note if you have any ideas.

Damian

Original comment by damian.e...@gmail.com on 21 Mar 2008 at 2:25