コード例 #1
0
ファイル: test_io.py プロジェクト: ryanmwhitephd/physt
 def test_io_equality_on_examples(self):
     from physt.examples import munros
     # for example in ALL_EXAMPLES:
     h = munros()
     json = h.to_json()
     read = io.parse_json(json)
     assert h == read
コード例 #2
0
ファイル: test_io.py プロジェクト: janpipek/physt
 def test_io_equality_on_examples(self):
     from physt.examples import munros
     # for example in ALL_EXAMPLES:
     h = munros()
     json = h.to_json()
     read = io.parse_json(json)
     assert h == read
コード例 #3
0
 def test_json_write_collection(self):
     bins = [1.2, 1.4, 1.5, 1.7, 1.8 ]
     values1 = [4, 0, 3, 7.2]
     values2 = [14, 10, 13, 17.2]
     col = HistogramCollection()
     col.add(Histogram1D(bins, values1))
     col.add(Histogram1D(bins, values2))
     json = col.to_json()
     read = io.parse_json(json)
     assert read == col
コード例 #4
0
ファイル: test_io.py プロジェクト: ryanmwhitephd/physt
 def test_simple(self):
     h = physt.h2(None, None, "integer", adaptive=True)
     h << (0, 1)
     json = h.to_json()
     read = io.parse_json(json)
     assert h == read
コード例 #5
0
ファイル: test_io.py プロジェクト: janpipek/physt
 def test_simple(self):
     h = physt.h2(None, None, "integer", adaptive=True)
     h << (0, 1)
     json = h.to_json()
     read = io.parse_json(json)
     assert h == read