Skip to content

Conversation

@antonio-rojas
Copy link
Contributor

Fixes

File "sage-src/src/sage/matrix/matrix_gfpn_dense.pyx", line 693, in sage.matrix.matrix_gfpn_dense.Matrix_gfpn_dense.copy_from_unsafe
Failed example:
    M = MatrixSpace(K, 3, 4, implementation=Matrix_gfpn_dense)(range(12))
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python3.13/site-packages/sage/doctest/forker.py", line 733, in _run
        self.compile_and_execute(example, compiler, test.globs)
        ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.13/site-packages/sage/doctest/forker.py", line 1157, in compile_and_execute
        exec(compiled, globs)
        ~~~~^^^^^^^^^^^^^^^^^
      File "<doctest sage.matrix.matrix_gfpn_dense.Matrix_gfpn_dense.copy_from_unsafe[1]>", line 1, in <module>
        M = MatrixSpace(K, Integer(3), Integer(4), implementation=Matrix_gfpn_dense)(range(Integer(12)))
                                                                  ^^^^^^^^^^^^^^^^^
    NameError: name 'Matrix_gfpn_dense' is not defined

This isn't detected by CI as it depends on the optional meataxe package

@xcaruso
Copy link
Contributor

xcaruso commented Aug 26, 2025

Thanks!

@xcaruso
Copy link
Contributor

xcaruso commented Aug 26, 2025

On my computer:

sage: from sage.matrix.matrix_gfpn_dense import Matrix_gfpn_dense
Traceback (most recent call last)
...
ModuleNotFoundError: No module named 'sage.matrix.matrix_gfpn_dense'

I think it's because it's a pyx file.

@antonio-rojas
Copy link
Contributor Author

On my computer:

sage: from sage.matrix.matrix_gfpn_dense import Matrix_gfpn_dense
Traceback (most recent call last)
...
ModuleNotFoundError: No module named 'sage.matrix.matrix_gfpn_dense'

I think it's because it's a pyx file.

You don't have the extension compiled. It's optional and you need to explicitly compile it (sage -i meataxe)

@github-actions
Copy link

Documentation preview for this PR (built with commit 238c7c5; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

Comment on lines +692 to 694
sage: from sage.matrix.matrix_gfpn_dense import Matrix_gfpn_dense
sage: K.<z> = GF(59)
sage: M = MatrixSpace(K, 3, 4, implementation=Matrix_gfpn_dense)(range(12))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sage: from sage.matrix.matrix_gfpn_dense import Matrix_gfpn_dense
sage: K.<z> = GF(59)
sage: M = MatrixSpace(K, 3, 4, implementation=Matrix_gfpn_dense)(range(12))
sage: K.<z> = GF(25)
sage: M = MatrixSpace(K, 3, 4, implementation='meataxe')(range(12)) # optional - meataxe, needs sage.rings.finite_rings

Copy link
Contributor Author

@antonio-rojas antonio-rojas Aug 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't work for me, it gives a AssertionError. Also, the optional - meataxe directive is not necessary as it's already present at the top of the file

@xcaruso
Copy link
Contributor

xcaruso commented Aug 26, 2025

You don't have the extension compiled. It's optional and you need to explicitly compile it (sage -i meataxe)

Ok. Then it looks fine.

@vbraun vbraun merged commit 7b58bd0 into sagemath:develop Sep 7, 2025
22 of 26 checks passed
@antonio-rojas antonio-rojas deleted the fix-meataxe-tests branch September 8, 2025 13:42
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.

3 participants