Giter Club home page Giter Club logo

adafdr's Issues

IndexError: boolean index did not match indexed array along dimension 1

Hi there,

I apologize, this might be a beginner problem. But I couldn't figure out why. Could you help me see it? Thanks!

xbsp.shape #(17113, 524) pbsp.shape #(17113, 1)

I was trying to use a (17113, 524) array as x, I tried both "covariate_type=None" and "covariate_type=np.zeros([524], dtype=bool)" but I have this error:

res = md.adafdr_test(pbsp, xbsp, alpha=0.1, covariate_type=covariate_type)

multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/python3.6/multiprocessing/pool.py", line 44, in mapstar
return list(map(*args))
File "/python3.6/site-packages/adafdr/method.py", line 364, in method_single_fold_wrapper
f_write=f_write, fast_mode=fast_mode)
File "/python3.6/site-packages/adafdr/method.py", line 605, in method_single_fold
f_write=f_write)
File "/python3.6/site-packages/adafdr/method.py", line 945, in method_init
x_null,x_alt = x[p>0.75],x[p<0.05]
IndexError: boolean index did not match indexed array along dimension 1; dimension is 524 but corresponding boolean dimension is 1
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "", line 1, in
File "/python3.6/site-packages/adafdr/method.py", line 502, in adafdr_test
res = po.map(method_single_fold_wrapper, Y_input)
File "/python3.6/multiprocessing/pool.py", line 266, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/python3.6/multiprocessing/pool.py", line 644, in get
raise self._value
IndexError: boolean index did not match indexed array along dimension 1; dimension is 524 but corresponding boolean dimension is 1

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.