Py3 zilany2014#17
Draft
iekimcelikay wants to merge 11 commits intomrkrd:masterfrom
Draft
Conversation
This PR migrates the zilany2014 package to full Python 3 compatibility while maintaining the same functionality. Changes to zilany2014 package: - cochlea/zilany2014/__init__.py: Convert map() to list(map()) for Python 3 lazy evaluation compatibility (line ~109) - cochlea/zilany2014/zilany2014_rate.py: Convert map() to list(map()) for Python 3 compatibility (line ~67) - cochlea/zilany2014/_zilany2014.pyx: Add Cython language_level=3 directive for Python 3 syntax Build configuration changes (setup.py): - Removed zilany2009 and holmberg2007 extensions from build (they have separate Cython 3.x compatibility issues) - Added CYTHON_CCOMPLEX=0 macro to disable C complex number issues - Added NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION for NumPy compatibility - Set language_level=3 in Cython compiler directives - Added -std=c99 compiler flag for C99 standard support - Updated Python version classifiers to include 3.6-3.9 Package-level changes (cochlea/__init__.py): - Commented out imports for zilany2009 and holmberg2007 models - These models require separate Python 3/Cython 3 migration Testing: - Successfully builds on Python 3.9 - Extension module compiles without errors - zilany2014 functions are importable and functional Note: The zilany2009 and holmberg2007 packages have Cython 3. x compatibility issues (complex number type errors) and should be migrated in separate PRs. Tested on: Python 3. 9, GCC, NumPy 1.x
Updated installation instructions and added Python version note.
Co-authored-by: iekimcelikay <49038110+iekimcelikay@users.noreply.github.com>
…r-dependencies Add pyproject.toml to declare Cython and numpy as build dependencies
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ONLY FOR ZILANY2014 MODEL
Zilany2014 model works in python3.9 now. However the other models are cancelled (commented) in this version.