8000 ENH: add dtype option to numpy.lib.function_base.cov and corrcoef by lschwetlick · Pull Request #17456 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

ENH: add dtype option to numpy.lib.function_base.cov and corrcoef #17456

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Oct 9, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use universal datatypes in cov test as well
  • Loading branch information
lschwetlick committed Oct 5, 2020
commit 199bf5da2aa193be5b53c11a5556e1c20b5b0038
5 changes: 1 addition & 4 deletions numpy/lib/tests/test_function_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2129,11 +2129,8 @@ def test_unit_fweights_and_aweights(self):
aweights=self.unit_weights),
self.res1)

@pytest.mark.parametrize("test_type", [getattr(np, dtype, None) for dtype \
in ['float32', 'float64', 'float96', 'float128']])
@pytest.mark.parametrize("test_type", [np.half, np.single, np.double, np.longdouble])
def test_cov_dtype(self, test_type):
if test_type is None:
pytest.skip("Data type not available")
cast_x1 = self.x1.astype(test_type)
res = cov(cast_x1, dtype=test_type)
assert test_type == res.dtype
Expand Down
0