Coder Social home page Coder Social logo

Comments (4)

claire98han avatar claire98han commented on June 17, 2024 2

Hey @TomDonoghue @maestapereira - sorry for misunderstanding the issue. I updated my branch and now get the same results as you.

from spiketools.

claire98han avatar claire98han commented on June 17, 2024

Hey @maestapereira , I just check the compute_spatial_bin_assignment function with the exact example you provided above, and it works fine.

Here is the output I get when I print(x_bins, y_bins):

[1 2 3 4] [1 2 3 4]

I don't know why exactly you got a different output but my guess is that maybe you haven't fetched upstream with main which has the changes we previously made to the compute_spatial_bin_assignment function.

REPLACED:
x_bins = pd.cut(position[0, :], x_edges, labels=np.arange(len(x_edges) - 1))
y_bins = pd.cut(position[1, :], y_edges, labels=np.arange(len(y_edges) - 1))

WITH:
x_bins = np.digitize(position[0, :], x_edges, right=True)
y_bins = np.digitize(position[1, :], y_edges, right=True)

Hope this helps!

from spiketools.

TomDonoghue avatar TomDonoghue commented on June 17, 2024

Hey @claire98han - thanks for also checking into this! I also get the same results as Sandra (and I think I know what's going on). I think the difference is that your version is behind (I made changes to this file yesterday, and introduced this bug it seems).

Claire, can you update from main, and double check that you get the same answer as Sandra and I?

from spiketools.

TomDonoghue avatar TomDonoghue commented on June 17, 2024

Fixed in #39 39

from spiketools.

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.