-
Notifications
You must be signed in to change notification settings - Fork 594
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure random seed has an effect for pca
- Loading branch information
Showing
4 changed files
with
67 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
"""This file contains some common fixtures for use in tests. | ||
This is kept seperate from the helpers file because it relies on pytest. | ||
""" | ||
import pytest | ||
import numpy as np | ||
from scipy import sparse | ||
|
||
from anndata.tests.helpers import asarray | ||
|
||
|
||
@pytest.fixture( | ||
params=[sparse.csr_matrix, sparse.csc_matrix, asarray], | ||
ids=["scipy-csr", "scipy-csc", "np-ndarray"], | ||
) | ||
def array_type(request): | ||
"""Function which converts passed array to one of the common array types.""" | ||
return request.param | ||
|
||
|
||
@pytest.fixture(params=[np.float64, np.float32]) | ||
def float_dtype(request): | ||
return request.param |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters