Skip to content

Commit

Permalink
docs: update tutorials
Browse files Browse the repository at this point in the history
  • Loading branch information
filimarc committed Nov 1, 2024
1 parent 0eabf30 commit 7c58b33
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/morphologies/usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
first_quarter = np.arange(len(special_branch)) < len(special_branch) / 4
special_branch.label(["initial_segment"], first_quarter)
# Assign random data as the `random_data` property to the branch
special_branch.set_property(random_data=np.random.random(len(special_branch)))
special_branch.set_properties(random_data=np.random.random(len(special_branch)))
print(f"Random data for each point:", special_branch.random_data)

network.morphologies.save("processed_morphology", morpho)
6 changes: 3 additions & 3 deletions examples/tutorials/load_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
print(f"My network has {len(scaffold.cell_types)} cell types")

# Load placement information from the storage.
for cell_type in scaffold.cell_types:
ps = cell_type.get_placement_set()
for cell_type in scaffold.cell_types.items():
ps = cell_type[1].get_placement_set()
pos = ps.load_positions()
print(f"{len(pos)} {cell_type.name} placed")
print(f"{len(pos)} {cell_type[1].name} placed")
# The positions are a (Nx3) numpy array
print("The median cell is located at", np.median(pos, axis=0))

Expand Down

0 comments on commit 7c58b33

Please sign in to comment.