Giter Club home page Giter Club logo

Comments (2)

dhadka avatar dhadka commented on August 10, 2024

This is called out in the Python docs -

Platypus/platypus/types.py

Lines 111 to 122 in 3fec9d1

"""Represents an integer value with min and max bounds.
Integers extend the Binary representation and encodes the integer as a
gray-encoded binary value. The gray-encoding ensures that adjacent
integers (e.g., i and i+1) differ only by one bit.
Given max_value and min_value, the underlying representation chooses the
minimum number of bits required to store the integer in a binary string.
If max_value-min_value is a power of 2, that each binary string maps to
an integer value. If max_value-min_value is not a power of 2, then some
integers will have two binary strings mapping to the value, meaning those
values have a slightly higher probability of occurrence.

Use the decode method to convert from the binary representation to the integer.

from platypus.

this-josh avatar this-josh commented on August 10, 2024

This is not the docs, this is the docstring. You don't typically expect users to read through the code to find doc strings and if that is what you expect them to do I think it should be made explicit. For example integer is also not present in the docs, nor is decode. But as you point out the doc strings have been written, so I refer to my initial issue that this should all be made clearer in the docs

from platypus.

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.