Skip to content

Test failure in recent numpy / python 3.9 versions #65

@gfabbian

Description

@gfabbian

I have been trying to do a recent reinstall with a fresh environment using conda and MacOS Ventura. The following command installs an environment that still works.

conda create -n s4cmb-dev -c conda-forge python=3.7 camb openmpi ephem pyslalib jupyter healpy coverage coveralls mpi4py

However switching just the python version to 3.9 the compilation seems ok but there are multiple failures on the test level. The difference between the 2 environment in dumpy/f2py is the version that moves from 1.21 to 1.24.

**********************************************************************
File "/Users/gfabbian/Software/s4cmb-dev/s4cmb/s4cmb/tod.py", line 1321, in __main__.TimeOrderedDataPairDiff.tod2map
Failed example:
    for pair in tod.pair_list:
      d = np.array([tod.map2tod(det) for det in pair])
      tod.tod2map(d, m, gdeprojection=True)
Exception raised:
    Traceback (most recent call last):
      File "/Users/gfabbian/opt/anaconda3/envs/s4cmb-dev/lib/python3.9/doctest.py", line 1334, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest __main__.TimeOrderedDataPairDiff.tod2map[31]>", line 3, in <module>
        tod.tod2map(d, m, gdeprojection=True)
      File "/Users/gfabbian/Software/s4cmb-dev/s4cmb/s4cmb/tod.py", line 1406, in tod2map
        tod_f.tod2map_pair_f(
    tod_f.error: (shape(diff_weight, 0) == npix) failed for 14th argument npix: tod2map_pair_f:npix=139992

The behavior behavior seems connected to how f2py/numpy interpret data types with the current fortran code written in the repo. Suggestions welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions