Skip to content

BUG: Incorrect result for numpy.matmul when order="F" is passed #29164

@vtavana

Description

@vtavana

Describe the issue:

numpy.matmul returns incorrect result when order="F" with numpy-2.3.0. With numpy-2.2.6, it was working fine.

Reproduce the code example:

import numpy
print("numpy version: ", numpy.__version__)
a = numpy.arange(24, dtype="f8").reshape((4,2,3))
b = numpy.arange(60, dtype="f8").reshape((4,3,5))
res = numpy.matmul(a, b, order="F")
print(res[0, ...])
# numpy version:  2.3.0
#  ** On entry to DGEMM  parameter number 13 had an illegal value
#  ** On entry to DGEMM  parameter number 13 had an illegal value
#  ** On entry to DGEMM  parameter number 13 had an illegal value
#  ** On entry to DGEMM  parameter number 13 had an illegal value
# [[5.43472924e-310 5.43508168e-310 6.85110253e-310 6.85110253e-310
#   6.85110253e-310]
#  [0.00000000e+000 5.43508169e-310 5.43508169e-310 6.85110251e-310
#   6.85110253e-310]]

Error message:

Python and NumPy Versions:

2.3.0
3.12.11 | packaged by conda-forge | (main, Jun 4 2025, 14:45:31) [GCC 13.3.0]

Runtime Environment:

No response

Context for the issue:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy