Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding test with numpy constants #158

Merged
merged 4 commits into from
Jul 15, 2024

Conversation

campospinto
Copy link
Collaborator

@campospinto campospinto commented Jul 15, 2024

On my machine these lines trigger an error when run with python3.12

    import numpy as np
    from sympde.topology import AffineMapping

    dim   = 2
    alpha = np.pi/2
    c1    = 0.2
    c2    = 1.5

    F =  AffineMapping(
        name='F', dim=2, c1=c1, c2=c2,
        a11=np.cos(alpha), a12=-np.sin(alpha),
        a21=np.sin(alpha), a22=np.cos(alpha),
    )

@campospinto campospinto requested a review from saidctb July 15, 2024 17:12
@campospinto campospinto self-assigned this Jul 15, 2024
@campospinto campospinto added the bug Something isn't working label Jul 15, 2024
@campospinto
Copy link
Collaborator Author

campospinto commented Jul 15, 2024

One solution seems to convert all the numpy constants to native python constants in sympde/topology/mapping.py

@campospinto campospinto merged commit 1080ced into master Jul 15, 2024
6 checks passed
@campospinto campospinto deleted the adding-mapping-test-with-numpy-constants branch July 15, 2024 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants