# obspy.core.inventory.util.BaseNode.copy¶

BaseNode.copy()[source]

Returns a deepcopy of the object.

Return type: same class as original object Copy of current object.

Examples

1. Create a station object and copy it

>>> from obspy import read_inventory
>>> sta2 = sta.copy()


The two objects are not the same:

>>> sta is sta2
False


But they have equal data (before applying further processing):

>>> sta == sta2
True

2. The following example shows how to make an alias but not copy the data. Any changes on st3 would also change the contents of st.

>>> sta3 = sta
>>> sta is sta3
True
>>> sta == sta3
True