TypeError: cannot pickle 'fortran' object

@terrycojones, this PR should fix the underlying issue. But as @ricardoV94 said, having this problem usually means that for some reason, pytensor does not know where to find the BLAS libraries to link with directly. I don’t have a Mac so I can’t properly check this stuff, but usually conda installations bring BLAS stuff that you can use directly.

Could I ask you if you have the vecLib libraries in your M2 Mac? If you do, what do you get if you try to run clang --print-search-dirs? I would like to understand where the frameworks are installed by default so that I can get pytensor to find the accelerate framework libraries automatically.