Double Declining Balance Method (DOUBLE)

Compute the depreciation for an asset using the double declining balance method. 
 syse.double(cost: ndarray, salvage_value: ndarray, useful_life: int, rate: float) ndarray
Compute the depreciation for an asset using the double declining balance method.
 Parameters:
cost (np.ndarray) – The cost of the asset.
salvage_value (np.ndarray) – The salvage value of the asset.
useful_life (int) – The useful life of the asset.
rate (float) – The depreciation rate, expressed as a fraction of 1.
 Returns:
The depreciation for the asset.
 Return type:
np.ndarray
Note
The function takes the same inputs as the declining_balance_method function, but computes the depreciation using the double declining balance method. The double declining balance method assumes that the asset depreciates by a fixed percentage of its remaining book value each year, but that the rate of depreciation is twice the straightline rate.
Examples:
Suppose a company purchases a printing press for $100,000, with an expected salvage value of $10,000 after 4 years. The company expects to use the printing press for 4 years. The depreciation rate for the printing press is 50% per year using the double declining balance method. We can compute the depreciation for the printing press using the double function
depreciation = syse.double(cost=100000, salvage_value=10000, useful_life=4, rate=0.5) print(f"The total depreciation for the printing press over 4 years is ${depreciation:.2f}.") Output = The total depreciation for the printing press over 4 years is $90,000.00.
This means that the company can deduct $90,000 as a depreciation expense over the 4year life of the printing press for tax purposes. At the end of 4 years, the book value of the printing press will be $10,000, which is the expected salvage value.