Replaced all type(new_scalar_list[0][0]).__name__ with conditional.

            if np.ndim(new_scalar_list) == 1:
                scalar_type = type(new_scalar_list[0]).__name__
            elif np.ndim(new_scalar_list) == 2:
                scalar_type = type(new_scalar_list[0][0]).__name__
            else: