differt.utils module

differt.utils module#

General purpose utilities.

Functions

safe_divide(num, den)

Compute the elementwise division, but returns 0 when den is zero.

sample_points_in_bounding_box(bounding_box)

Sample point(s) in a 3D bounding box.

smoothing_function(x, /[, smoothing_factor])

Return a smoothed approximation of the Heaviside step function.