예제 #1
0
 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
 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