This has been fixed on master. I've just backported the fix to the release
branch so it should be okay in 0.3.8.

2015-04-16 4:05 GMT-04:00 Rasmus Brandt <[email protected]>:

> Hey everyone,
>
> I just stumbled over this behaviour in Julia-0.3.7, which seems a bit
> unintuitive to me:
>
> julia> pinv(0)
> Inf
>
> julia> pinv([0])
> 1x1 Array{Float64,2}:
>  0.0
>
> In Matlab R2012a I get:
>
> >> pinv(0)
>
> ans =
>
>      0
>
> It seems that the definition
> pinv(x::Number) = one(x)/x
> satisfies the Moore-Penrose conditions for all x != 0.
>
> Is this intentional, or a bug?
>
> -- Rasmus
>

Reply via email to