Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
mavaylon1 committed Mar 3, 2024
1 parent 3b0a6d8 commit b32aeb1
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/gallery/plot_term_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,20 @@
data=TermSetWrapper(value=['Homo sapiens'], termset=terms)
)

######################################################
# Validate Compound Data with TermSetWrapper
# ----------------------------------------------------
# :py:class:`~hdmf.term_set.TermSetWrapper` can be wrapped around compound data.
# The user will set the field within the compound data type that is to be validated
# with the termset.
c_data = np.array([('Homo sapiens', 24)], dtype=[('species', 'U50'), ('age', 'i4')])
data = VectorData(
name='species',
description='...',
data=TermSetWrapper(value=c_data, termset=terms, field='species')
)


######################################################
# Validate Attributes with TermSetWrapper
# ----------------------------------------------------
Expand Down

0 comments on commit b32aeb1

Please sign in to comment.