'Computes the bandwidth of the data.
Parameters
bw: array_like or str
If array_like: user-specified bandwidth.
If a string, should be one of:
- cv_ml: cross validation maximum likelihood
- normal_reference: normal reference rule of thumb
- cv_ls: cross validation least squares
Notes
The default values for bw is \'normal_reference\'.'

def _compute_bw(self, bw):

    self.bw_func = dict(normal_reference=self._normal_reference, cv_ml=self._cv_ml, cv_ls=self._cv_ls)
    if (bw is None):
        bwfunc = self.bw_func['normal_reference']
        return bwfunc()
    if (not isinstance(bw, string_types)):
        self._bw_method = 'user-specified'
        res = np.asarray(bw)
    else:
        self._bw_method = bw
        bwfunc = self.bw_func[bw]
        res = bwfunc()
    return res
