Skip to content

Commit

Permalink
🐛 make testing of minor function for creating fake data more robust
Browse files Browse the repository at this point in the history
- not really used anymore, but was handy while developing ideas
  • Loading branch information
Henry committed Apr 24, 2024
1 parent 59c8ddb commit f983259
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/test_helpers.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import numpy as np


from vaep.utils import create_random_missing_data


def test_create_random_missing_data():
data = create_random_missing_data(N=43, M=13, prop_missing=0.2)
assert data.shape == (43, 13)
assert np.isnan(data).sum()
assert abs((float(np.isnan(data).sum()) / (43 * 13)) - 0.2) < 0.05
assert abs((float(np.isnan(data).sum()) / (43 * 13)) - 0.2) < 0.1

0 comments on commit f983259

Please sign in to comment.