Github user itg-abby commented on the issue:

    https://github.com/apache/spark/pull/15496
  
    I have applied the code change to both ML and MLLIB now. And, I added some 
simple tests to check if the SciPy sparse functions are behaving correctly. 
(Only MLLIB has tests for SciPy functions so I only added test cases there).
    
    Additionally, I updated the implementation with a wrapper script which 1) 
allows for functions with inputs to work correctly and 2) seamlessly allows for 
SciPy's functions which generate a SciPy matrix output to be automatically 
returned as a SparseVector object.
    
    Example use case:
    ```
    c = SparseVector(40, {1: 1, 3: 2, 23: 7, 25:9, 39:3})
    c.power(4)
    
    SparseVector(40, {1: 1.0, 3: 16.0, 23: 2401.0, 25: 6561.0, 39: 81.0})
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to