#f2py

Infrapink (he/his/him)Infrapink@mastodon.ie
2025-06-17

Things I learned yesterday and today.

Python doesn't understand quadruple-precision real numbers. f2py will happily compile Fortran code containing real(16)s into a form that Python can talk to, but Python will segfault as soon as it receives one of those real(16)s.

Also, Fortran's built-in fraction function doesn't do what I thought it did.

#Programming #Python #Fortran #F2PY

Infrapink (he/his/him)Infrapink@mastodon.ie
2025-06-04

Hold on, f2py CAN make Fortran functions comprehensible to Python‽ I DON'T have to use subroutines‽ Fortran syntax is just incredibly FUSSY‽

#Programming #Fortran #Python #f2py

2024-02-04

複数のファイルにわかれている #Fortran コードを #f2py 経由で #Python から呼べるようにするために知っておきたいことのブックマーク。
notmatthancock.github.io/2017/

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst