IPython 8.4.0 Pypi GitHub Homepage
Other Docs
NotesParameters
reset(self, parameter_s='')

Notes

Calling this magic from clients that do not implement standard input, such as the ipython notebook interface, will reset the namespace without confirmation.

Parameters

-f :

force reset without asking for confirmation.

-s :

'Soft' reset: Only clears your namespace, leaving history intact. References to objects may be kept. By default (without this option), we do a 'hard' reset, giving you a new session and removing all references to objects from the current session.

--aggressive :

Try to aggressively remove modules from sys.modules ; this may allow you to reimport Python modules that have been updated and pick up changes, but can have unattended consequences.

in :

reset input history

out :

reset output history

dhist :

reset directory history

array :

reset only variables that are NumPy arrays

Resets the namespace by removing all names defined by the user, if called without arguments, or by removing some types of objects, such as everything currently in IPython's In[] and Out[] containers (see the parameters for details).

See Also

reset_selective

invoked as %reset_selective

Examples

In [6]: a = 1

In [7]: a Out[7]: 1

In [8]: 'a' in get_ipython().user_ns Out[8]: True

In [9]: %reset -f

In [1]: 'a' in get_ipython().user_ns Out[1]: False

In [2]: %reset -f in Flushing input history

In [3]: %reset -f dhist in Flushing directory history Flushing input history

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /IPython/core/magics/namespace.py#476
type: <class 'function'>
Commit: