Code Monkey home page Code Monkey logo

confseq's People

Contributors

gostevehoward avatar wannabesmith avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

confseq's Issues

gcc cannot find "uniform_boundaries.h" when installing through pip

When I run pip3 install confseq, gcc complains it cannot find "uniform_boundaries.h" when building confseq.boundaries extension.

    building 'confseq.boundaries' extension
    creating build/temp.linux-x86_64-3.9
    creating build/temp.linux-x86_64-3.9/src
    creating build/temp.linux-x86_64-3.9/src/confseq
    gcc -pthread -B /private/home/xxx/.conda/envs/my_env/compiler_compat -Wl,--sysroot=/ -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /private/home/xxx/.conda/envs/my_env/include -fno-semantic-interposition -fPIC -O2 -isystem /private/home/xxx/.conda/envs/my_env/include -fno-semantic-interposition -fPIC -I/private/home/xxx/.conda/envs/my_env/lib/python3.9/site-packages/pybind11/include -I/private/home/xxx/.conda/envs/my_env/lib/python3.9/site-packages/pybind11/include -I/private/home/xxx/.conda/envs/my_env/include/python3.9 -c src/confseq/boundaries.cpp -o build/temp.linux-x86_64-3.9/src/confseq/boundaries.o -DVERSION_INFO="0.0.5" -std=c++14 -fvisibility=hidden
    src/confseq/boundaries.cpp:4:10: fatal error: uniform_boundaries.h: No such file or directory
        4 | #include "uniform_boundaries.h"
          |          ^~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    error: command '/usr/bin/gcc' failed with exit code 1

I installed your package successfully last year; the failure appears when installing it on my server and new laptop. I wonder if the recent change you made broke the installation.

Argument num_successes in bernoulli_confidence_interval only accepts ints

The documentation of function bernoulli_confidence_interval implies that argument num_successes could take real values:

* `num_successes`: number of "successful" Bernoulli trials seen so far,
      or more generally, sum of observed outcomes.

However, the code seems to allow only integer-valued arguments. In python

y = np.random.uniform(size=100)
boundaries.bernoulli_confidence_interval(  
    num_successes=np.sum(y),  # Argument is float
    num_trials=100, 
    alpha=0.1, 
    t_opt=100, 
    alpha_opt=0.1)

leads to this error:

TypeError: bernoulli_confidence_interval(): incompatible function arguments. The following argument types are supported:
    1. (num_successes: int, num_trials: int, alpha: float, t_opt: float, alpha_opt: float = 0.05) -> Tuple[float, float]
Invoked with: kwargs: num_successes=51.445863688932626, num_trials=100, alpha=0.1, t_opt=100, alpha_opt=0.1

The message disappears if we replace e.g., np.sum(y) by int(np.sum(y)).

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.