[SciPy-user] Strange Warning When Running Simple Script

Lorenzo Isella lorenzo.isella@gmail....
Wed Mar 25 06:33:19 CDT 2009


Dear All,
I am running debian testing (for the amd64 architecture) on my machine
and I have Num(Sci)Py and matplotlib installed from standard
repositories.
Today, I have run again a simple code to create arrays by stitching
together several copies of the same array

#! /usr/bin/env python
import scipy as s
import numpy as n
import pylab as p


def replica(pos_arr, N_rep):
    #temp=pos_arr
    dim=s.shape(pos_arr)
    n_row=dim[0]
    if (len(dim)>1):
        n_col=dim[1]
        print "n_row and n_col are, ", n_row, n_col
    else:
        print "n_row is, ", n_row


    if (len(dim)>1):
        copy=s.zeros(((n_row*N_rep),n_col))
    else:
        copy=s.zeros((n_row*N_rep))




    for i in xrange(N_rep):
        if (len(dim)>1):
            copy[(i*n_row):((i+1)*n_row),:]=pos_arr
        else:
            copy[(i*n_row):((i+1)*n_row)]=pos_arr


    return copy

eta_0=s.array([0.389,0.389,0.389,0.389,0.389,0.389,0.389,0.389])
eta_1=s.sqrt(eta_0)


my_copy=replica(eta_0,200)

p.save("eta_0_8_200", my_copy)

my_copy=replica(eta_1,200)

p.save("eta_1_8_200", my_copy)


print "So far so good"




However, when I run this code (replica.py) now (I have not touched
this script in a while) I get the following output


$ ./replica.py
/usr/lib/python2.5/site-packages/scipy/misc/__init__.py:25:
DeprecationWarning: NumpyTest will be removed in the next release;
please update your code to use nose or unittest
  test = NumpyTest().test
n_row is,  8
n_row is,  8
So far so good

I never had that warning before. Is it anything I should be worried about?
Cheers

Lorenzo


More information about the SciPy-user mailing list