Coder Social home page Coder Social logo

np.where best practices about m2g HOT 2 CLOSED

wrgr avatar wrgr commented on July 2, 2024
np.where best practices

from m2g.

Comments (2)

gkiar avatar gkiar commented on July 2, 2024

When I switched True in that statement to 1 the parser stopped
complaining and it still worked. The only risk here is that a mask may
contain values {0, 100} or something else arbitrarily not zero or 1.
Perhaps we simply say >0 instead of is True or == 1 to be robust and
pep8 compliant?

Greg Kiar [email protected]

On Thu, Feb 4, 2016 at 6:53 AM, William Gray [email protected]
wrote:

Confirm we are using np.where the pep8 way.

Upstream we set a mask equal to True/False, so (np.where == True) should
be ok.

PEP8 complains, but may be the parser or still the right way to do it.


Reply to this email directly or view it on GitHub
#26.

from m2g.

wrgr avatar wrgr commented on July 2, 2024

i believe we addressed this. It works and is pep8 compliant.

from m2g.

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.