On Mon, Oct 29, 2012 at 2:03 PM, Andreas Mueller
<[email protected]> wrote:
> Hi everybody.
> Olivier asked me to explain my commit:
> https://github.com/scikit-learn/scikit-learn/commit/00d1055bf9f00e7024f9c4757262ffb852a61267
> On the ML, so here goes:
> The code used
>
> as_float_array(startprob, copy=False)
>
> which I replaced with
>
>
> np.array(startprob, dtype=np.float)
>
> Basically as_float_array converts arrays to float, but respects how many
> bits it had.
> So int32 is converted to float32 and int64 is converted to float64.
> And that is basically all the function does (if I understand correctly)
> - though it
> is safe for sparse matrices, which is a bit of a hassle otherwise.

Comment from the peanut gallery: this seems like a supremely odd
function to have, since int32s cannot be safely represented in 32-bit
floating point anyway (nor int64s in float64, but there's not much you
can do about it without resorting to software arithmetic). In most
cases, I would think float64 should be preferred.

David

------------------------------------------------------------------------------
The Windows 8 Center - In partnership with Sourceforge
Your idea - your app - 30 days.
Get started!
http://windows8center.sourceforge.net/
what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to