Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated API verison and other warnings #99

Open
thwjoy opened this issue Apr 4, 2017 · 1 comment
Open

Deprecated API verison and other warnings #99

thwjoy opened this issue Apr 4, 2017 · 1 comment

Comments

@thwjoy
Copy link

thwjoy commented Apr 4, 2017

Hi Guys, I tried running the noisy example but I get the following error? I've tried reinstalling the scipy stack but to no avail... Does anyone have any ideas? It keeps outputting the error as if it was part of a loop.

`Minimum expected objective value under model is 162.12392 (+/- 47.70827), at location:
NAME TYPE VALUE
---- ---- -----
y float 15.000000
x float 10.000000

Minimum of observed values is 38.554245, at location:
NAME TYPE VALUE
---- ---- -----
y float 7.500000
x float 2.500000
In file included from /home/tomj/.local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1777:0,
from /home/tomj/.local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
from /home/tomj/.local/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from /home/tomj/.cache/scipy/python27_compiled/sc_efe69a3fecba151ef9b75ee9eed626cb5351.cpp:23:
/home/tomj/.local/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by "
^
In file included from /home/tomj/.local/lib/python2.7/site-packages/scipy/weave/blitz/blitz/array-impl.h:37:0,
from /home/tomj/.local/lib/python2.7/site-packages/scipy/weave/blitz/blitz/array.h:26,
from /home/tomj/.cache/scipy/python27_compiled/sc_efe69a3fecba151ef9b75ee9eed626cb5351.cpp:11:
/home/tomj/.local/lib/python2.7/site-packages/scipy/weave/blitz/blitz/range.h: In member function ‘bool blitz::Range::isAscendingContiguous() const’:
/home/tomj/.local/lib/python2.7/site-packages/scipy/weave/blitz/blitz/range.h:120:34: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
return ((first_ < last_) && (stride_ == 1) || (first_ == last_));
`

@thwjoy
Copy link
Author

thwjoy commented Apr 5, 2017

Previous issue: #22

Soloution: Comment out lines 230 - 234 (remove the try and except blocks) and unindent lines 236 and 237 like so:

    #try:
    #    scipy.weave.inline(code, ['x1','x2','gX','ls','M','N','D'], \
    #                       type_converters=scipy.weave.converters.blitz, \
    #                       compiler='gcc')
    #except:
    # The C code weave above is 10x faster than this:
    for i in xrange(0,x1.shape[0]):
        gX[i,:,:] = 2*(x1[i,:] - x2[:,:])*(1/ls)

    return gX` 
```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant