test_kyd   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 14
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 5

3 Functions

Rating   Name   Duplication   Size   Complexity  
A test_struct() 0 4 2
A test_all_nan() 0 3 1
A test_int_data() 0 4 2
1
from knowyourdata import kyd
2
import numpy as np
3
4
5
def test_struct():
6
    test_array = np.ones(5)
7
    data_summary = kyd(test_array)
8
    assert(data_summary.f_allfinite == True)
9
10
11
def test_int_data():
12
    test_array = np.ones(5, dtype=np.int32)
13
    data_summary = kyd(test_array)
14
    assert(data_summary.dtype.name == 'int32')
15
16
17
def test_all_nan():
18
    test_array = np.ones(5) * np.nan
19
    data_summary = kyd(test_array)