File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -284,17 +284,16 @@ def get_microxs_from_multigroup(
284284 multigroup_flux = np .array (multigroup_flux )
285285 multigroup_flux /= multigroup_flux .sum ()
286286
287- # check_type("temperature", temperature, (int, float))
287+ cv .check_type ("temperature" , temperature , (int , float ))
288+ if temperature < 0. :
289+ raise ValueError (f"Temperature must be a positive number, not { temperature } " )
288290 # if energy is string then use group structure of that name
289291 if isinstance (energy , str ):
290292 energy = GROUP_STRUCTURES [energy ]
291293 else :
292294 # if user inputs energy check they are ascending (low to high) as
293295 # some depletion codes use high energy to low energy.
294- if not np .all (np .diff (energy ) > 0 ):
295- raise ValueError (
296- "Energy group boundaries must be in ascending order"
297- )
296+ cv .check_increasing (name = "energy" , value = energy )
298297
299298 # check dimension consistency
300299 if len (multigroup_flux ) != len (energy ) - 1 :
You can’t perform that action at this time.
0 commit comments