[Numpy-discussion] [Fwd: [Matplotlib-users] warning: Numeric and amd64]

Pearu Peterson pearu at cens.ioc.ee
Fri Oct 1 12:44:58 EDT 2004


On 1 Oct 2004, Todd Miller wrote:

> look at this:
>
> >>> from RandomArray import *
>
> >>> normal(2,2,10)
>  array([ 2.,  2.,  2.,  2.,  2.,  2.,  2.,  2.,  2.,  2.])
>
> This is Numeric 23.1 compiled on my AMD64!!! I ran the same tests on a
> 32bit P4 and it ran fine.
> Has anyone else seen this before?

Yes. I just fixed a similar issue in scipy.stats.rand module. Below is the
corresponding patch for Numeric Src/ranlibmodule.c that fixes the issue
for Opteron.

Regards,
Pearu

*** ranlibmodule.c      Fri Oct  1 22:29:57 2004
--- ranlibmodule.c.orig Fri Oct  1 22:12:13 2004
***************
*** 47,49 ****
      case 0:
!       *out_ptr = (double) ((float (*)(void)) fun)();
        break;
--- 47,49 ----
      case 0:
!       *out_ptr = (double) ((double (*)()) fun)();
        break;
***************
*** 81,83 ****
    case 1:
!     if( !PyArg_ParseTuple(args, "lf|i", &int_arg, &float_arg, &n) ) {
        return NULL;
--- 81,83 ----
    case 1:
!     if( !PyArg_ParseTuple(args, "if|i", &int_arg, &float_arg, &n) ) {
        return NULL;
***************
*** 213,215 ****
  
!   if( !PyArg_ParseTuple(args, "lO|i", &num_trials, &priors_object, &n) ) {
      return NULL;
--- 213,215 ----
  
!   if( !PyArg_ParseTuple(args, "iO|i", &num_trials, &priors_object, &n) ) {
      return NULL;






More information about the NumPy-Discussion mailing list