Sequence of names

Report a typo

There are a lot of packages for Python, for example, SciPy is the most popular library for advanced math. Suppose you need to work with the function csgraph_from_dense from this module: it constructs a sparse graph representation from a dense matrix. This function is located in the csgraph submodule of the sparse subpackage of the scipy library.

Take a look at the code below. If we run it right now, we will get the ImportError. Can you figure out what is wrong with this code snippet? Fix the mistake and run the code again.

Write a program in Python 3
from scipy.sparse import csgraph_from_dense
___

Create a free account to access the full topic