Skip to content

Conversation

@hmac213
Copy link
Contributor

@hmac213 hmac213 commented Jun 19, 2025

Changed all instances of ndarray.tostring() to ndarray.tobytes() for compatibility with NumPy 2.3, which removed the deprecated tostring() method.

@bobbykabob bobbykabob mentioned this pull request Jun 27, 2025
@mvdoc mvdoc requested a review from Copilot July 21, 2025 20:06
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates deprecated NumPy array serialization method calls to maintain compatibility with NumPy 2.3, which removed the deprecated tostring() method.

  • Replaces all instances of ndarray.tostring() with ndarray.tobytes() across multiple files
  • Ensures forward compatibility with newer NumPy versions while maintaining identical functionality

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
cortex/webgl/serve.py Updates array serialization for base64 encoding in JSON serialization
cortex/freesurfer.py Updates binary file writing operations for surface mesh data
cortex/formats.pyx Updates STL file format writing functionality
cortex/dataset/braindata.py Updates array hashing functionality

@mvdoc
Copy link
Contributor

mvdoc commented Jul 21, 2025

Thanks @hmac213!

@mvdoc mvdoc merged commit c27ce1d into gallantlab:main Jul 21, 2025
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.

2 participants