pytc.legacy.df.calculate_norm¶ pytc.legacy.df.calculate_norm(rho)[source]¶ Calculate the norm of the input tensor along trailing dimensions. :param rho: Input tensor (N_b, N_grid, *trailing_dims) or (N_b, N_grid) Returns: Normed tensor (N_b, N_grid) Return type: rho_normed Parameters: rho (numpy.ndarray)