Giter Site home page Giter Site logo

Great Addition about range HOT 4 CLOSED

john9631 avatar john9631 commented on August 25, 2024
Great Addition

from range.

Comments (4)

john9631 avatar john9631 commented on August 25, 2024

Oh. Yes, and import it with import range { range } to give a perfectly pythonic usage !

from range.

Delta456 avatar Delta456 commented on August 25, 2024

I was looking to rewrite the module and looks like you are already working on it. So far your code seems great but I would like to know how will range(1.1, 1.2) gonna work with your implementation because it has to be a part of this.

from range.

john9631 avatar john9631 commented on August 25, 2024

Surprisingly well seeing I hadn't looked at the numpy variations much. I started on V last week so I'm a bit new to it.

FYI, I also did a new test file which you can find at my git. Not sure how to test deliberate fails yet so haven't. Also not sure that this should fail to exit as my grasp of idiomatic V isn't strong - surprised you chose to fail with 1 rather than -1 (I'm a C/C++/Python person but am really enjoying V).

The numpy reverse looks ok too:

>>> range.range(1.25, 0.0, -.25)
[1.25, 1, 0.75, 0.5, 0.25]
>>> range.range(1.25, -0.25, -.25)
[1.25, 1, 0.75, 0.5, 0.25, 0]
>>> range.range(1.25, -0.000001, -.25)
[1.25, 1, 0.75, 0.5, 0.25, 0]
>>>

from range.

Delta456 avatar Delta456 commented on August 25, 2024

I have decided to go with #5

from range.

Related Issues (2)

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.