Beispiel #1
0
 def test_normalized_cone_resistance(self):
     df1 = pd.DataFrame({
         "qt": [0.0, 1.5, 2.5],
         "soil_pressure": [0.0, 0.25, 0.75],
         "effective_soil_pressure": [0.0, 0.25, -4.155],
     })
     v = geo.normalized_cone_resistance(df1)
     df = pd.DataFrame({
         "qt": [0.0, 1.5, 2.5],
         "soil_pressure": [0.0, 0.25, 0.75],
         "effective_soil_pressure": [0.0, 0.25, -4.155],
         "normalized_cone_resistance": [np.nan, 5.0, 1.0],
     })
     assert_frame_equal(v, df)
Beispiel #2
0
 def test_normalized_cone_resistance(self):
     df1 = pl.DataFrame({
         "qt": [0.0, 1.5, 2.5],
         "soil_pressure": [0.0, 0.25, 0.75],
         "effective_soil_pressure": [0.0, 0.25, -4.155],
     })
     v = geo.normalized_cone_resistance(df1)
     df = pl.DataFrame({
         "qt": [0.0, 1.5, 2.5],
         "soil_pressure": [0.0, 0.25, 0.75],
         "effective_soil_pressure": [0.0, 0.25, -4.155],
         "normalized_cone_resistance": [-np.nan, 5.0, 1.0],
     })
     # TODO: why aren't these equal with df.frame_equal?
     assert v.to_csv() == df.to_csv()