Reproduction
History({'s.x': [1., 2.], 'time': [10., 20.]}).get_fault_time('earliest') raises ValueError: Calling nonzero on 0d arrays is not allowed on current dev at a7f4c3e866d57d6020e83c24d376d8858ac155c5.
latest and times fail in the same way. The empty reduction is scalar zero, which NumPy rejects in np.where. total already returns zero. This also occurs for an empty history and an actual simulation history configured to record state variables only.
Expected behavior
Use the existing no-recorded-fault result (nan) for the position metrics, consistently with an all-false recorded trace. Preserve zero for total, index-based positions, nested histories and unchanged inputs.
The result describes recorded history only. Without fault tracking it does not establish whether the model experienced a fault. Regression controls should verify that recorded fault positions remain unchanged.
Reproduction
History({'s.x': [1., 2.], 'time': [10., 20.]}).get_fault_time('earliest')raisesValueError: Calling nonzero on 0d arrays is not allowedon currentdevata7f4c3e866d57d6020e83c24d376d8858ac155c5.latestandtimesfail in the same way. The empty reduction is scalar zero, which NumPy rejects innp.where.totalalready returns zero. This also occurs for an empty history and an actual simulation history configured to record state variables only.Expected behavior
Use the existing no-recorded-fault result (
nan) for the position metrics, consistently with an all-false recorded trace. Preserve zero fortotal, index-based positions, nested histories and unchanged inputs.The result describes recorded history only. Without fault tracking it does not establish whether the model experienced a fault. Regression controls should verify that recorded fault positions remain unchanged.