'to_scipy_sparse_matrix'

21 views
Skip to first unread message

Melika Keshavarz

unread,
Dec 19, 2023, 2:08:19 PM12/19/23
to networkx-discuss
Hello, I have a problem with (nx.convert.to_scipy_sparse_matrix)for networkx version 3 .

I have this error :module 'networkx.convert' has no attribute 'to_scipy_sparse_matrix'
I could not solve it please help me
thanks

Dan Schult

unread,
Dec 19, 2023, 2:22:17 PM12/19/23
to networkx...@googlegroups.com
Most functions are available from the main namespace:
   nx.to_scipy_sparse_array

If you want to dig into the guts, the `to_scipy_sparse_array` function is in the `convert_matrix` subpackage -- not the `convert` package. And the function changed from `to_scipy_sparse_matrix` to `to_scipy_sparse_array` a while ago. Perhaps your source of info about the interface is old. 
:)

--
You received this message because you are subscribed to the Google Groups "networkx-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to networkx-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/networkx-discuss/6b71578d-d726-4320-8e60-90b4ebb6672an%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages