Skip to content

Conversation

@samuelbray32
Copy link
Collaborator

@samuelbray32 samuelbray32 commented Feb 7, 2025

numpy 2.0 introduced new errors. Required changes:

  • columns object returned by np.fromfile now have a second axis of one dimesnion

    np.dtype(("f8", 1) will now return a shape 1 subarray dtype rather than a non-subarray one.

    • This raised errors when converting to pandas dataframe
    • Add function convert_datafile_to_pandas to do this cleanly
  • Numpy changed promotion rules of datatypes in 2.0

    • memap now required explicit casting to int16 in analog signal processing in SpikeGadgetsRawIO

@samuelbray32 samuelbray32 changed the title Fixes for new numpy Fixes for numpy 2.0 Feb 7, 2025
@samuelbray32 samuelbray32 requested a review from edeno February 7, 2025 16:49
@codecov
Copy link

codecov bot commented Feb 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.34%. Comparing base (fbf92a8) to head (f34e7ba).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #104      +/-   ##
==========================================
+ Coverage   90.32%   90.34%   +0.01%     
==========================================
  Files          25       25              
  Lines        2429     2433       +4     
==========================================
+ Hits         2194     2198       +4     
  Misses        235      235              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@edeno edeno merged commit a0a3b67 into main Feb 7, 2025
10 checks passed
@edeno edeno deleted the np_upgrade branch February 7, 2025 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants