<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def bin_num_doane(a):
 """Compute number of bins based on Doane's formula"""

    bad = np.isnan(a) | np.isinf(a)
    data = a[~bad]
    acc = bin_width_doane(a)
    num = np.int(np.round((data.max() - data.min()) / acc))
    return num