NaNs and Infs when decomposing EDS

### Describe the bug

![image](https://user-images.githubusercontent.com/115000993/193821091-c81abc88-3d20-4267-9c41-6742ce558f04.png)


### Steps/Code to Reproduce

![image](https://user-images.githubusercontent.com/115000993/193821217-41c152ce-fa8d-4d03-a5f0-970b4ea27584.png)


### Expected Results

I have ran the code before and it worked fine but I am unsure about why it is giving me the NaNs and Infs error now 

### Actual Results

ValueError                                Traceback (most recent call last)
Input In [29], in <cell line: 4>()
      1 scrop.change_dtype('float32')
----> 4 scrop.decomposition(True, algorithm='svd', output_dimension=15)
      6 scrop.learning_results.save('LowSite4_pca_15_results')
      8 scrop.plot_decomposition_results()

File /usr/local/anaconda3/lib/python3.9/site-packages/hyperspy/learn/mva.py:451, in MVA.decomposition(self, normalize_poissonian_noise, algorithm, output_dimension, centre, auto_transpose, navigation_mask, signal_mask, var_array, var_func, reproject, return_info, print_info, svd_solver, copy, **kwargs)
    448 mean = None
    450 if algorithm == "SVD":
--> 451     factors, loadings, explained_variance, mean = svd_pca(
    452         data_,
    453         svd_solver=svd_solver,
    454         output_dimension=output_dimension,
    455         centre=centre,
    456         auto_transpose=auto_transpose,
    457         **kwargs,
    458     )
    460 elif algorithm == "MLPCA":
    461     if var_array is not None and var_func is not None:

File /usr/local/anaconda3/lib/python3.9/site-packages/hyperspy/learn/svd_pca.py:285, in svd_pca(data, output_dimension, svd_solver, centre, auto_transpose, svd_flip, **kwargs)
    282     else:
    283         auto_transpose = False
--> 285 U, S, V = svd_solve(
    286     data,
    287     output_dimension=output_dimension,
    288     svd_solver=svd_solver,
    289     svd_flip=svd_flip,
    290     **kwargs,
    291 )
    293 explained_variance = S ** 2 / N
    295 if auto_transpose is False:

File /usr/local/anaconda3/lib/python3.9/site-packages/hyperspy/learn/svd_pca.py:153, in svd_solve(data, output_dimension, svd_solver, svd_flip, u_based_decision, **kwargs)
    149     if not sklearn_installed:  # pragma: no cover
    150         raise ImportError(
    151             "svd_solver='randomized' requires scikit-learn to be installed"
    152         )
--> 153     U, S, V = randomized_svd(data, n_components=output_dimension, **kwargs)
    154 elif svd_solver == "arpack":
    155     if Version(scipy.__version__) < Version("1.4.0"):  # pragma: no cover

File /usr/local/anaconda3/lib/python3.9/site-packages/sklearn/utils/extmath.py:395, in randomized_svd(M, n_components, n_oversamples, n_iter, power_iteration_normalizer, transpose, flip_sign, random_state)
    391 if transpose:
    392     # this implementation is a bit faster with smaller shape[1]
    393     M = M.T
--> 395 Q = randomized_range_finder(
    396     M,
    397     size=n_random,
    398     n_iter=n_iter,
    399     power_iteration_normalizer=power_iteration_normalizer,
    400     random_state=random_state,
    401 )
    403 # project M to the (k + p) dimensional space using the basis vectors
    404 B = safe_sparse_dot(Q.T, M)

File /usr/local/anaconda3/lib/python3.9/site-packages/sklearn/utils/extmath.py:237, in randomized_range_finder(A, size, n_iter, power_iteration_normalizer, random_state)
    235     Q = safe_sparse_dot(A.T, Q)
    236 elif power_iteration_normalizer == "LU":
--> 237     Q, _ = linalg.lu(safe_sparse_dot(A, Q), permute_l=True)
    238     Q, _ = linalg.lu(safe_sparse_dot(A.T, Q), permute_l=True)
    239 elif power_iteration_normalizer == "QR":

File /usr/local/anaconda3/lib/python3.9/site-packages/scipy/linalg/decomp_lu.py:209, in lu(a, permute_l, overwrite_a, check_finite)
    152 """
    153 Compute pivoted LU decomposition of a matrix.
    154 
   (...)
    206 
    207 """
    208 if check_finite:
--> 209     a1 = asarray_chkfinite(a)
    210 else:
    211     a1 = asarray(a)

File /usr/local/anaconda3/lib/python3.9/site-packages/numpy/lib/function_base.py:488, in asarray_chkfinite(a, dtype, order)
    486 a = asarray(a, dtype=dtype, order=order)
    487 if a.dtype.char in typecodes['AllFloat'] and not np.isfinite(a).all():
--> 488     raise ValueError(
    489         "array must not contain infs or NaNs")
    490 return a

**ValueError: array must not contain infs or NaNs**

### Versions

```shell
Hyperspy 1.7.2
Scikit-learn 1.0.2
Conda version 22.9.0
```

COMMENT:
Thanks for reporting the issue. Could you please also include a [minimal and reproducible example](http://sscce.org/) for us to better diagnose the problem?

Ideally we should be able to copy/paste your code to reproduce the issue.

Closing unless you can provide us the reproducer.

Labels: Bug, Needs Triage