GithubHelp home page GithubHelp logo

dnerini / ssft-generator Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 2.0 297 KB

Stochastic noise generator based on short space Fourier transform.

License: GNU General Public License v3.0

Python 100.00%

ssft-generator's People

Contributors

cvelascof avatar dnerini avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ssft-generator's Issues

ssft_utils gives an TypeError wiht numpy 1.13.0

Hi Daniele

For some reason if you are using numpy 1.13.0 and py35_0 your main.py gets this error message.


TypeError Traceback (most recent call last)
in ()
4 winsize1 = rainField_dBZ.shape[0]
5 overlap1 = 0
----> 6 corrNoiseGlobal = ssft_generator(rainField_dBZ, winsize=winsize1, overlap=overlap1)
7

~/code/ssft-generator-v1.0.0/dnerini-ssft-generator-52e9bf0/ssft_utils.py in ssft_generator(rainField, winsize, overlap)
77 mask = np.zeros(rainField.shape)
78
---> 79 mask[idxi[0]:idxi[1],idxj[0]:idxj[1]] = wind

TypeError: only integer scalar arrays can be converted to a scalar index

The solution is to replace line 79 in ssft_utils.py
from:
mask[idxi[0]:idxi[1],idxj[0]:idxj[1]] = wind
to:
mask[idxi.item(0):idxi.item(1),idxj.item(0):idxj.item(1)] = wind

Cheers

Carlos

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.