コード例 #1
0
 def test_shape_of_output(self):
     x = np.linspace(0, 10, num=50)
     npts = 20
     xgrid = utilities.make_x_grid(x=x, npts=20)
     self.assertEqual(
         xgrid.shape, (npts, 1),
         msg=str('Expected return dimension of ({}, 1)'.format(npts)))
コード例 #2
0
 def test_default_shape_of_output_for_dense_x(self):
     x = np.linspace(0, 10, num=500)
     xgrid = utilities.make_x_grid(x=x)
     self.assertEqual(xgrid.shape, (100, 1),
                      msg='Expected return dimension of (100, 1)')