コード例 #1
0
 def test_daz(self):
     daz.set_daz()
     np.testing.assert_equal(self.normal / self.scale, 0)
     np.testing.assert_equal(self.denormal * self.scale, 0)
     np.testing.assert_equal(self.denormal, 0)
     daz.unset_daz()
     self.check_normal()
コード例 #2
0
 def test_daz(self):
     daz.set_daz()
     assert self.normal / self.scale == 0
     assert self.denormal * self.scale == 0
     assert self.denormal == 0
     daz.unset_daz()
     self.check_normal()
コード例 #3
0
    try:
        import cupy
    except:
        print("module cupy is not installed", flush=True, file=sys.stderr)
        exit(1)

# Timer Start

time_start = time.time()

# Set daz

if not arg.no_daz:
    try:
        import daz
        daz.set_daz()
    except ImportError as e:
        pass

# Getting data from input file

data_raw = np.zeros(1)

if arg.mat:

    # Getting data from mat file

    import h5py
    datafile = h5py.File(arg.i, 'r')
    data_raw = np.array(list(datafile.items())[0][1])
    datafile.close()