Version 3.5.2 (2026-07-14)
-
Starsim v3.5.0 added several optimizations affecting how random numbers are drawn. However, these changes introduced several
dtype-related bugs that have been fixed in this release:- Fixed a bug where
ss.random()always returnedfloat64regardless of the configured typess.dtypes.float. - Fixed
ss.poisson()sometimes returningfloat64and sometimes returning an integer. It now always returnsss.dtypes.int. - Fixed
ss.multi_random.rvs()returning an incorrect number of samples due to type mismatches. - Regression: Because the default CRN mechanism precision has changed to consistently match
ss.dtypes.float, the exact random values produced for agent-indexed draws are different from v3.5.1.
- Fixed a bug where
-
ss.uids()now performs additional validation to more consistently ensure it only contains integers.- Migration: Previously
ss.uids([1.5])would convert the input to an integer and thus returnss.uids([1]). However, because this usage would often reflect an error, this operation will now raise aTypeErrorto prevent inadvertent conversion of floats silently succeeding. To maintain previous functionality, convert the input to integers before callingss.uids().
- Migration: Previously
-
Timeline.now()returns durations rather than bare floats, for simulations that use duration-based units. -
Made the
folderargument ofss.Samplesoptional, and moved it from first to third.- Migration: Positionally-created Samples should use kwargs instead, e.g.
ss.Samples(resultsdir, outputs)should be changed toss.Samples(outputs, folder=resultsdir).
- Migration: Positionally-created Samples should use kwargs instead, e.g.
-
GitHub info: PR 1393