コード例 #1
0
 def test_array_return_with_iqrange_gt_0(self, mock_iqrange):
     x = np.random.random_sample(size=(1, 100))
     s = utilities.scale_bandwidth(x=x)
     self.assertTrue(isinstance(s, np.ndarray),
                     msg='Expected array return \
                     - received {}'.format(type(s)))
     self.assertEqual(s.size, 1, msg='Expect single element array')
コード例 #2
0
 def test_array_return_with_column_vector_input(self):
     x = np.random.random_sample(size=(100, 1))
     s = utilities.scale_bandwidth(x=x)
     self.assertTrue(isinstance(s, np.ndarray),
                     msg='Expected array return \
                     - received {}'.format(type(s)))
     self.assertEqual(s.size, 1, msg='Expect single element array')