EMS-TU-Ilmenau / fastmat

A library to build up lazily evaluated expressions of linear transforms for efficient scientific computing.
https://fastmat.readthedocs.io
Apache License 2.0
24 stars 8 forks source link

Add herm Option in CG and fix Bug in Test #26

Closed SebastianSemper closed 6 years ago

SebastianSemper commented 6 years ago
  1. The CG Algorithm gets a herm option which yields a speedup by factor of two.

  2. Fix Bug in Testgeneration, which has set wrong sizes, which lead to test crashes

SebastianSemper commented 6 years ago

The issues raised above together with some additional parameter renaming spitting down the same whole were added.

SebastianSemper commented 6 years ago

Using the following code

import fastmat; import numpy
x = numpy.random.randn(3)
A = fastmat.Eye(3)
fastmat.algs.CG(A,x)

results in x being a vector containing only zeros.

ChristophWWagner commented 6 years ago

could you please try this again with the current HEAD of cython-fix? I think of a bug that could cause this behaviour, which is fixed there.

ChristophWWagner commented 6 years ago

Problem detected.

ChristophWWagner commented 6 years ago

Fixed in eee59939fe1e0f92c5686e8626e3739472952758. An explicit note was added to the documentation of the Eye and Matrix class about the return object of any transform potentially being a view into or the input array itself.