This is documentation for
an old version (3.2.1)
.
Switch to stable version
Skip to main content
Back to top
Ctrl
+
K
Site Navigation
Install
Tutorial
Reference
Gallery
Developer
Releases
Guides
Search
Ctrl
+
K
Home Page
GitHub
3.2.1
latest
3.4.2 (stable)
3.4.1
3.4
3.3
3.2.1
3.2
Search
Ctrl
+
K
Site Navigation
Install
Tutorial
Reference
Gallery
Developer
Releases
Guides
Home Page
GitHub
3.2.1
latest
3.4.2 (stable)
3.4.1
3.4
3.3
3.2.1
3.2
Section Navigation
Introduction
Graph types
Algorithms
Functions
degree
degree_histogram
density
create_empty_copy
is_directed
to_directed
to_undirected
is_empty
add_star
add_path
add_cycle
subgraph
induced_subgraph
restricted_view
edge_subgraph
nodes
number_of_nodes
neighbors
all_neighbors
non_neighbors
common_neighbors
edges
number_of_edges
density
non_edges
selfloop_edges
number_of_selfloops
nodes_with_selfloops
is_weighted
is_negatively_weighted
set_node_attributes
get_node_attributes
set_edge_attributes
get_edge_attributes
is_path
path_weight
freeze
is_frozen
Graph generators
Linear algebra
Converting to and from other data formats
Relabeling nodes
Reading and writing graphs
Drawing
Randomness
Exceptions
Utilities
Glossary
Reference
Functions
number_of_nodes
number_of_nodes
#
number_of_nodes
(
G
)
[source]
#
Returns the number of nodes in the graph.
On this page
number_of_nodes()