python-tutorial icon indicating copy to clipboard operation
python-tutorial copied to clipboard

Errors found in `library_numpy` notebok

Open yakutovicha opened this issue 1 year ago • 6 comments

yakutovicha avatar Dec 14 '23 08:12 yakutovicha

Typo:

Exercises on specifying the data type.

  1. Create an array of 100 booleans all set to True. The array should have dimensions 2x3.

The part "The array should have dimensions 2x3." should be removed

GCatarina avatar Dec 14 '23 08:12 GCatarina

In Indexing, slicing, and iterating, the first sentence after the first python code starts with Unlinke.

fabioacl avatar Dec 14 '23 08:12 fabioacl

In the final exercises, when integrating the function we need to be explicit about the density of x points. Because different point density gives slightly different results. "Slightly different" means sufficient enough to cause the test failure.

yakutovicha avatar Dec 14 '23 09:12 yakutovicha

For the exercise on eigenvalues:

  • The solution uses eigh. If people use eig the test will fail because the order of eigenvalues is different. This can be overcome by testing for invariants like the trace and the determinant.
  • The exercise should ideally be parametrized in order for multiple matrices to be teasd

baffelli avatar Dec 14 '23 09:12 baffelli

In Exercises on NumPy routines, exercise 2., tests fail if we do not use the fact that the matrix is hermitian: eig and eigh give same eigenvalues but in different orders, and eigenvectors are slightly different

GCatarina avatar Dec 14 '23 09:12 GCatarina

In Exercises on NumPy routines, exercise 2., tests fail if we do not use the fact that the matrix is hermitian: eig and eigh give same eigenvalues but in different orders, and eigenvectors are slightly different

Thanks, we already noted this above

baffelli avatar Dec 14 '23 09:12 baffelli