When you are describing an error, you should say what the error is.
Here I'm pretty sure it says there is no such member of Vector, right?
You explicitly made the type of sv2 Vector and not SparseVector, and
the trait does not have any indices member. No it's not a problem, and
I think the compiler tells you what's happening in this case.

On Tue, Feb 3, 2015 at 6:17 AM, Manoj Kumar
<manojkumarsivaraj...@gmail.com> wrote:
> Hello,
>
> This is related to one of the issues that I'm working on. I am not sure if
> this is expected behavior or not.
>
> This works fine.
> val sv2 = new SparseVector(3, Array(0, 2), Array(1.1, 3.0))
> sv2.indices
>
> But when I do this
> val sv2: Vector = Vectors.sparse(3, Array(0, 2), Array(1.1, 3.0))
> sv2.indices
>
> It raises an error.
>
> If agreed that this is not expected, I can send a Pull Request.
> Thanks.
>
>
>
> --
> Godspeed,
> Manoj Kumar,
> http://manojbits.wordpress.com
> <http://goog_1017110195>
> http://github.com/MechCoder

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@spark.apache.org
For additional commands, e-mail: dev-h...@spark.apache.org

Reply via email to