GithubHelp home page GithubHelp logo

Comments (3)

tommy307507 avatar tommy307507 commented on June 3, 2024 1

In line 384 of read_tide_model.py, there is a missing [:] after v1.data causing the error:
AttributeError: can't set attribute
v1.data = bilinear_interp(xi,yv,v,x,y,dtype=np.complex128)

proposed fix:
adding the [:], this also matches the syntax used in line 324 for u1.data

from pytmd.

tommy307507 avatar tommy307507 commented on June 3, 2024

I would want to add in read_tide_model.py there's also this issue of len(npts) being used incorrectly. The fix would be changing npts = len(D) to npts = D.shape , and adding an asterisk (*) to before the npts used in the assignment of placeholder matrices. i.e.
np.ma.zeros((*npts,nc)....) and np.ma.zeros((*npts),...)
below to use the starred expression.
Thanks for the package but I had a hard time figuring this out …

from pytmd.

tsutterley avatar tsutterley commented on June 3, 2024

Hi @tommy307507, sorry I'm out of town so I'm a little slow on responses.

These are good points. I typically flatten the input fields so I don't run into the shape issues. It's a good point that I should add some logic for different shaped fields for people not using the "higher order" programs for computing heights or currents. I should also update the documentation so that people don't run into the problems you've noted.

I'll definitely fix the attribute error as soon as I get back in the office. Or if you want to put a PR in to fix it that would be great too.

from pytmd.

Related Issues (20)

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.