Importing Libraries: Difference between revisions

From GNU Radio
Jump to navigation Jump to search
(Created page with "The import block enables calls to Python-based libraries such as NumPy within GRC, allowing for more sophistication in the use and creation of variables and parameters for blocks. ==Import Block== Drag the Import block into the flowgraph. File:Importing_libraries_import_block.png")
 
Line 3: Line 3:


==Import Block==
==Import Block==
Drag the Import block into the flowgraph.
Drag the '''Import''' block into the flowgraph.


[[File:Importing_libraries_import_block.png]]
Double-click the '''Import''' block to bring up the properties. The ''Import'' field receives any legal Python import statement. For this example, the Numpy library is imported as ''np''.


[[File:Importing_libraries_import_block.png]]
[[File:Importing_libraries_import_statement.png]]
 
 
The '''Import''' block then displays the imported library as np.
 
[[File:Importing_libraries_after_numpy_import.png]]

Revision as of 21:31, 10 April 2024

The import block enables calls to Python-based libraries such as NumPy within GRC, allowing for more sophistication in the use and creation of variables and parameters for blocks.


Import Block

Drag the Import block into the flowgraph.

Importing libraries import block.png


Double-click the Import block to bring up the properties. The Import field receives any legal Python import statement. For this example, the Numpy library is imported as np.

Importing libraries import statement.png


The Import block then displays the imported library as np.

Importing libraries after numpy import.png