@@ -114,6 +114,21 @@ def test_wind_rose_init():
114114 with pytest .raises (ValueError ):
115115 WindRose (wind_directions , wind_speeds , 0.06 , np .ones ((3 , 3 )))
116116
117+ # Test that instantiating with non-integer wind directions and wind speeds works
118+ wind_directions = np .array ([270.0 , 280.0 , 290.0 ])
119+ wind_speeds = np .array ([6.0 , 7.0 ])
120+ _ = WindRose (wind_directions , wind_speeds , ti_table = 0.06 )
121+
122+ wind_directions = np .array ([270.5 , 280.5 , 290.5 ])
123+ wind_speeds = np .array ([6.5 , 7.5 ])
124+ _ = WindRose (wind_directions , wind_speeds , ti_table = 0.06 )
125+
126+ # Test that instantiating with non-integer steps works
127+ _ = WindRose (
128+ wind_directions = np .linspace (0.0 , 360.0 , 100 , endpoint = False ),
129+ wind_speeds = np .array ([5.0 ]),
130+ ti_table = 0.06 ,
131+ )
117132
118133def test_wind_rose_grid ():
119134 wind_directions = np .array ([270 , 280 , 290 ])
@@ -799,6 +814,16 @@ def test_wind_ti_rose_init():
799814 with pytest .raises (ValueError ):
800815 WindTIRose (wind_directions , wind_speeds , turbulence_intensities , np .ones ((3 , 3 , 3 )))
801816
817+ # Test that instantiating with non-integer wind directions and wind speeds works
818+ _ = WindTIRose (wind_directions + 0.5 , wind_speeds + 0.2 , turbulence_intensities )
819+
820+ # Test that instantiating with non-integer steps works
821+ _ = WindTIRose (
822+ wind_directions = np .linspace (0.0 , 360.0 , 100 , endpoint = False ),
823+ wind_speeds = np .array ([5.0 ]),
824+ turbulence_intensities = turbulence_intensities ,
825+ )
826+
802827
803828def test_wind_ti_rose_grid ():
804829 wind_directions = np .array ([270 , 280 , 290 , 300 ])
0 commit comments