Skip to content

Py3 zilany2014#17

Draft
iekimcelikay wants to merge 11 commits intomrkrd:masterfrom
iekimcelikay:py3-zilany2014
Draft

Py3 zilany2014#17
iekimcelikay wants to merge 11 commits intomrkrd:masterfrom
iekimcelikay:py3-zilany2014

Conversation

@iekimcelikay
Copy link
Copy Markdown

@iekimcelikay iekimcelikay commented Feb 20, 2026

ONLY FOR ZILANY2014 MODEL
Zilany2014 model works in python3.9 now. However the other models are cancelled (commented) in this version.

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.
@iekimcelikay iekimcelikay marked this pull request as draft February 20, 2026 15:06
Copilot AI and others added 4 commits February 20, 2026 15:19
Co-authored-by: iekimcelikay <49038110+iekimcelikay@users.noreply.github.com>
…r-dependencies

Add pyproject.toml to declare Cython and numpy as build dependencies
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