def _align_nums(nums):
    try:
        # The statement can throw a ValueError if one
        # of the numerators is a single digit and another
        # is array-like e.g. if nums = [5, [1, 2, 3]]
        nums = asarray(nums)

        if not np.issubdtype(nums.dtype, np.number):
            raise ValueError("dtype of numerator is non-numeric")

        return nums

    except ValueError:
        nums = list(nums)
        maxwidth = len(max(nums, key=lambda num: atleast_1d(num).size))

        for index, num in enumerate(nums):
            num = atleast_1d(num).tolist()
            nums[index] = [0] * (maxwidth - len(num)) + num

        return atleast_1d(nums)
Given an array of numerator coefficient arrays [[a_1, a_2,...,
dataset/ETHPy150Open scipy/scipy/scipy/signal/filter_design.py/_align_nums