Giter VIP home page Giter VIP logo

Comments (7)

bqpd avatar bqpd commented on July 21, 2024

it looks like you were in the gpfit folder? Shouldn't you import gpfit.fit?

from gpfit.

1ozturkbe avatar 1ozturkbe commented on July 21, 2024

poop. I need a lesson in libraries and importing instead. But why did it give the error above? I'm still confused about that; shouldn't it have failed outright?

from gpfit.

bqpd avatar bqpd commented on July 21, 2024

Not if you were in the gpfit folder, or any folder with a file called fit.py

from gpfit.

1ozturkbe avatar 1ozturkbe commented on July 21, 2024

I am stupid... so please explain to me why I need to say import gpfit.fit instead of just import fit within the folder. Because I understand using from fit import fit, but wouldn't import fit just suffice?

from gpfit.

bqpd avatar bqpd commented on July 21, 2024

in Python 2, import <filename in current directory> will import that file directly, not as part of its package, so you get the non-package error. Better to just never work directly in the gpfit repository unless you're actually editing gpfit code...

from gpfit.

1ozturkbe avatar 1ozturkbe commented on July 21, 2024

K. Note taken, and lesson in imports learned. Thanks Ned, closing!

from gpfit.

bqpd avatar bqpd commented on July 21, 2024

https://www.python.org/dev/peps/pep-0328/#guido-s-decision and http://stackoverflow.com/a/11537218 have some details!

from gpfit.

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.