memory-graph 0.3.38__tar.gz → 0.3.39__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) hide show
  1. {memory_graph-0.3.38/memory_graph.egg-info → memory_graph-0.3.39}/PKG-INFO +62 -61
  2. {memory_graph-0.3.38 → memory_graph-0.3.39}/README.md +61 -60
  3. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/add_one.gv +18 -18
  4. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/avltree_key_value.gv +12 -12
  5. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/avltree_leaf.gv +5 -5
  6. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/avltree_linear.gv +12 -12
  7. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/avltree_table.gv +12 -12
  8. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/bin_search.gv +34 -34
  9. memory_graph-0.3.38/images/bin_search_linear.py → memory_graph-0.3.39/images/bin_search.py +4 -4
  10. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/bin_search_linear.gv +29 -29
  11. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/bin_tree.gv +35 -35
  12. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/copies.gv +20 -20
  13. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/copy_method.gv +16 -16
  14. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/create_images.sh +0 -1
  15. memory_graph-0.3.39/images/debugging.gif +0 -0
  16. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/debugging.py +2 -8
  17. memory_graph-0.3.39/images/debugging0.gv +29 -0
  18. memory_graph-0.3.39/images/debugging0.png +0 -0
  19. memory_graph-0.3.39/images/debugging1.gv +38 -0
  20. memory_graph-0.3.39/images/debugging1.png +0 -0
  21. memory_graph-0.3.39/images/debugging2.gv +47 -0
  22. memory_graph-0.3.39/images/debugging2.png +0 -0
  23. memory_graph-0.3.39/images/debugging3.gv +57 -0
  24. memory_graph-0.3.39/images/debugging3.png +0 -0
  25. memory_graph-0.3.39/images/debugging4.gv +68 -0
  26. memory_graph-0.3.39/images/debugging4.png +0 -0
  27. memory_graph-0.3.39/images/debugging5.gv +68 -0
  28. memory_graph-0.3.39/images/debugging5.png +0 -0
  29. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/extension_numpy.gv +8 -8
  30. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/extension_pandas.gv +8 -8
  31. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/factorial0.gv +3 -3
  32. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/factorial0.png +0 -0
  33. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/factorial1.gv +6 -6
  34. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/factorial1.png +0 -0
  35. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/factorial2.gv +8 -8
  36. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/factorial2.png +0 -0
  37. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/factorial3.gv +10 -10
  38. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/factorial3.png +0 -0
  39. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/factorial4.gv +10 -10
  40. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/factorial4.png +0 -0
  41. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/factorial5.gv +8 -8
  42. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/factorial5.png +0 -0
  43. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/factorial6.gv +6 -6
  44. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/factorial6.png +0 -0
  45. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/hash_set.gv +29 -29
  46. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/highlight.gv +16 -16
  47. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/immutable1.gv +4 -4
  48. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/immutable2.gv +6 -6
  49. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/introspect_depth.gv +56 -56
  50. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/linked_list.gv +20 -20
  51. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/many_types.gv +12 -12
  52. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/mutable1.gv +4 -4
  53. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/mutable2.gv +4 -4
  54. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/not_node_types1.gv +6 -6
  55. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/not_node_types2.gv +16 -16
  56. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set0.gv +11 -11
  57. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set0.png +0 -0
  58. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set1.gv +17 -17
  59. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set1.png +0 -0
  60. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set10.gv +36 -36
  61. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set10.png +0 -0
  62. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set11.gv +31 -31
  63. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set11.png +0 -0
  64. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set12.gv +31 -31
  65. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set12.png +0 -0
  66. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set13.gv +36 -36
  67. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set13.png +0 -0
  68. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set14.gv +41 -41
  69. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set14.png +0 -0
  70. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set15.gv +43 -43
  71. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set15.png +0 -0
  72. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set16.gv +40 -40
  73. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set16.png +0 -0
  74. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set17.gv +40 -40
  75. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set17.png +0 -0
  76. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set18.gv +45 -45
  77. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set18.png +0 -0
  78. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set19.gv +47 -47
  79. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set19.png +0 -0
  80. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set2.gv +22 -22
  81. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set2.png +0 -0
  82. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set20.gv +44 -44
  83. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set20.png +0 -0
  84. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set21.gv +39 -39
  85. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set21.png +0 -0
  86. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set22.gv +34 -34
  87. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set22.png +0 -0
  88. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set23.gv +28 -28
  89. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set23.png +0 -0
  90. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set3.gv +27 -27
  91. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set3.png +0 -0
  92. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set4.gv +32 -32
  93. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set4.png +0 -0
  94. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set5.gv +34 -34
  95. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set5.png +0 -0
  96. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set6.gv +32 -32
  97. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set6.png +0 -0
  98. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set7.gv +32 -32
  99. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set7.png +0 -0
  100. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set8.gv +37 -37
  101. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set8.png +0 -0
  102. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set9.gv +39 -39
  103. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set9.png +0 -0
  104. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/rebinding1.gv +4 -4
  105. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/rebinding2.gv +6 -6
  106. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph/__init__.py +3 -3
  107. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph/config.py +1 -0
  108. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph/config_default.py +3 -0
  109. {memory_graph-0.3.38 → memory_graph-0.3.39/memory_graph.egg-info}/PKG-INFO +62 -61
  110. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph.egg-info/SOURCES.txt +12 -8
  111. {memory_graph-0.3.38 → memory_graph-0.3.39}/pyproject.toml +1 -1
  112. memory_graph-0.3.38/images/bin_search.py +0 -40
  113. memory_graph-0.3.38/images/bin_search2.png +0 -0
  114. memory_graph-0.3.38/images/debugging.gif +0 -0
  115. memory_graph-0.3.38/images/debugging01.png +0 -0
  116. memory_graph-0.3.38/images/debugging02.png +0 -0
  117. memory_graph-0.3.38/images/debugging03.png +0 -0
  118. memory_graph-0.3.38/images/debugging04.png +0 -0
  119. memory_graph-0.3.38/images/debugging05.png +0 -0
  120. memory_graph-0.3.38/images/debugging06.png +0 -0
  121. {memory_graph-0.3.38 → memory_graph-0.3.39}/LICENSE.txt +0 -0
  122. {memory_graph-0.3.38 → memory_graph-0.3.39}/MANIFEST.in +0 -0
  123. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/-0 +0 -0
  124. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/.gif +0 -0
  125. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/.idea/.gitignore +0 -0
  126. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/.idea/images.iml +0 -0
  127. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/.idea/inspectionProfiles/profiles_settings.xml +0 -0
  128. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/.idea/misc.xml +0 -0
  129. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/.idea/modules.xml +0 -0
  130. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/.idea/vcs.xml +0 -0
  131. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/.idea/workspace.xml +0 -0
  132. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/add_one.png +0 -0
  133. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/add_one.py +0 -0
  134. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/avltree.py +0 -0
  135. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/avltree.py~ +0 -0
  136. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/avltree_dir.gv +0 -0
  137. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/avltree_dir.png +0 -0
  138. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/avltree_fail.gv +0 -0
  139. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/avltree_fail.png +0 -0
  140. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/avltree_key_value.png +0 -0
  141. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/avltree_leaf.png +0 -0
  142. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/avltree_linear.png +0 -0
  143. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/avltree_table.png +0 -0
  144. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/bin_search.png +0 -0
  145. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/bin_search.py~ +0 -0
  146. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/bin_search_linear.png +0 -0
  147. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/bin_search_linear.py~ +0 -0
  148. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/bin_tree.gif +0 -0
  149. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/bin_tree.png +0 -0
  150. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/bin_tree.py +0 -0
  151. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/bin_tree2.py +0 -0
  152. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/bin_tree2.py~ +0 -0
  153. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/call_stack.txt +0 -0
  154. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/colab_example.png +0 -0
  155. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/copies.png +0 -0
  156. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/copies.py +0 -0
  157. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/copy_method.png +0 -0
  158. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/copy_method.py +0 -0
  159. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/create_gif.sh +0 -0
  160. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/debug.gv +0 -0
  161. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/debug.pdf +0 -0
  162. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/debug_vscode.png +0 -0
  163. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/debugging01.gv +0 -0
  164. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/debugging02.gv +0 -0
  165. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/debugging03.gv +0 -0
  166. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/debugging04.gv +0 -0
  167. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/debugging05.gv +0 -0
  168. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/debugging06.gv +0 -0
  169. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/depth.gv +0 -0
  170. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/depth.png +0 -0
  171. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/extension_numpy.png +0 -0
  172. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/extension_numpy.py +0 -0
  173. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/extension_pandas.png +0 -0
  174. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/extension_pandas.py +0 -0
  175. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/factorial.gif +0 -0
  176. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/factorial.py +0 -0
  177. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/factorial01.gv +0 -0
  178. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/factorial02.gv +0 -0
  179. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/factorial03.gv +0 -0
  180. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/factorial04.gv +0 -0
  181. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/factorial05.gv +0 -0
  182. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/factorial06.gv +0 -0
  183. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/factorial07.gv +0 -0
  184. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/hash_set.gif +0 -0
  185. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/hash_set.png +0 -0
  186. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/hash_set.py +0 -0
  187. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/hidden_edges.gv +0 -0
  188. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/hidden_edges.png +0 -0
  189. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/hidden_edges.py +0 -0
  190. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/hidden_edges.py~ +0 -0
  191. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/highlight.png +0 -0
  192. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/highlight.py +0 -0
  193. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/immutable.py +0 -0
  194. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/immutable1.png +0 -0
  195. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/immutable2.png +0 -0
  196. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/introspect_depth.png +0 -0
  197. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/introspect_depth.py +0 -0
  198. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/introspect_depth.py~ +0 -0
  199. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/ipython.png +0 -0
  200. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/jupyter_example.png +0 -0
  201. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/linked_list.gif +0 -0
  202. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/linked_list.png +0 -0
  203. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/linked_list.py +0 -0
  204. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/log.txt +0 -0
  205. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/many_types.png +0 -0
  206. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/many_types.py +0 -0
  207. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/memory_graph.gv +0 -0
  208. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/memory_graph.gv.pdf +0 -0
  209. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/memory_graph.pdf +0 -0
  210. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/mutable.py +0 -0
  211. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/mutable1.png +0 -0
  212. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/mutable2.png +0 -0
  213. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/my_graph.gv +0 -0
  214. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/my_graph.pdf +0 -0
  215. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/name_rebinding.py +0 -0
  216. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/not_node_types.py +0 -0
  217. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/not_node_types.py~ +0 -0
  218. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/not_node_types1.png +0 -0
  219. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/not_node_types2.png +0 -0
  220. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set.gif +0 -0
  221. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set.py +0 -0
  222. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set19.png~ +0 -0
  223. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/power_set8.png~ +0 -0
  224. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/pyodide.png +0 -0
  225. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/rebinding1.png +0 -0
  226. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/rebinding2.png +0 -0
  227. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/stack.txt +0 -0
  228. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/test.py +0 -0
  229. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/test.py~ +0 -0
  230. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/uva.png +0 -0
  231. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/vsc.py +0 -0
  232. {memory_graph-0.3.38 → memory_graph-0.3.39}/images/vscode_copying.gif +0 -0
  233. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph/call_stack.py +0 -0
  234. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph/config_helpers.py +0 -0
  235. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph/extension_numpy.py +0 -0
  236. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph/extension_pandas.py +0 -0
  237. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph/html_table.py +0 -0
  238. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph/list_view.py +0 -0
  239. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph/memory_to_nodes.py +0 -0
  240. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph/node_base.py +0 -0
  241. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph/node_key_value.py +0 -0
  242. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph/node_leaf.py +0 -0
  243. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph/node_linear.py +0 -0
  244. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph/node_table.py +0 -0
  245. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph/sequence.py +0 -0
  246. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph/slicer.py +0 -0
  247. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph/slices.py +0 -0
  248. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph/slices_iterator.py +0 -0
  249. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph/slices_table_iterator.py +0 -0
  250. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph/test.py +0 -0
  251. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph/test_max_graph_depth.py +0 -0
  252. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph/test_memory_graph.py +0 -0
  253. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph/test_memory_to_nodes.py +0 -0
  254. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph/test_sequence.py +0 -0
  255. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph/test_slicer.py +0 -0
  256. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph/test_slices.py +0 -0
  257. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph/test_slices_iterator.py +0 -0
  258. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph/utils.py +0 -0
  259. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph.egg-info/dependency_links.txt +0 -0
  260. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph.egg-info/requires.txt +0 -0
  261. {memory_graph-0.3.38 → memory_graph-0.3.39}/memory_graph.egg-info/top_level.txt +0 -0
  262. {memory_graph-0.3.38 → memory_graph-0.3.39}/setup.cfg +0 -0
  263. {memory_graph-0.3.38 → memory_graph-0.3.39}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: memory_graph
3
- Version: 0.3.38
3
+ Version: 0.3.39
4
4
  Summary: Teaching tool and debugging aid in context of references, mutable data types, and shallow and deep copy.
5
5
  Author-email: Bas Terwijn <bterwijn@gmail.com>
6
6
  License-Expression: BSD-2-Clause
@@ -61,7 +61,7 @@ mg.render(data) # renders to default: 'memory_graph.pdf'
61
61
  ```
62
62
 
63
63
  # Sharing Values #
64
- In Python, assigning the list from variable `a` to variable `b` causes both variables to reference the same list value and thus share it. Consequently, any change applied through one variable will impact the other. This behavior can lead to elusive bugs if a programmer incorrectly assumes that list `a` and `b` are independent.
64
+ In Python, assigning a list from variable `a` to variable `b` causes both variables to reference the same list value and thus share it. Consequently, any change applied through one variable will impact the other. This behavior can lead to elusive bugs if a programmer incorrectly assumes that list `a` and `b` are independent.
65
65
 
66
66
  <table><tr><td>
67
67
 
@@ -100,7 +100,7 @@ b: 4, 3, 2, 1
100
100
  ids: 126432214913216 126432214913216
101
101
  identical?: True
102
102
  ```
103
- A better way to understand what data is shared is to draw a graph of the data using the [memory_graph](https://pypi.org/project/memory-graph/) package.
103
+ A better way to understand what data is shared is to draw a graph using [memory_graph](https://pypi.org/project/memory-graph/).
104
104
 
105
105
  # Chapters #
106
106
 
@@ -108,20 +108,18 @@ A better way to understand what data is shared is to draw a graph of the data us
108
108
 
109
109
  [Call Stack](#call-stack)
110
110
 
111
- [Global Import Trick](#global-import-trick)
112
-
113
111
  [Debugging](#debugging)
114
112
 
115
113
  [Data Structure Examples](#data-structure-examples)
116
114
 
117
115
  [Configuration](#configuration)
118
116
 
119
- [Extensions](#extensions)
120
-
121
117
  [Introspection](#introspection)
122
118
 
123
119
  [Graph Depth](#graph-depth)
124
120
 
121
+ [Extensions](#extensions)
122
+
125
123
  [Jupyter Notebook](#jupyter-notebook)
126
124
 
127
125
  [ipython](#ipython)
@@ -182,7 +180,7 @@ a = [4, 3, 2]
182
180
  b = a
183
181
  mg.render(locals(), 'mutable1.png')
184
182
 
185
- b += [1] # equivalent to: b.append(1)
183
+ b += [1] # equivalent to: b.append(1)
186
184
  mg.render(locals(), 'mutable2.png')
187
185
  ```
188
186
  | ![mutable1.png](https://raw.githubusercontent.com/bterwijn/memory_graph/main/images/mutable1.png) | ![mutable2.png](https://raw.githubusercontent.com/bterwijn/memory_graph/main/images/mutable2.png) |
@@ -198,11 +196,11 @@ Python offers three different "copy" options that we will demonstrate using a ne
198
196
  import memory_graph as mg
199
197
  import copy
200
198
 
201
- a = [ [1, 2], ['x', 'y'] ] # a nested list (a list containing lists)
199
+ a = [ [1, 2], ['x', 'y'] ] # a nested list (a list containing lists)
202
200
 
203
201
  # three different ways to make a "copy" of 'a':
204
202
  c1 = a
205
- c2 = copy.copy(a) # equivalent to: a.copy() a[:] list(a)
203
+ c2 = copy.copy(a) # equivalent to: a.copy() a[:] list(a)
206
204
  c3 = copy.deepcopy(a)
207
205
 
208
206
  mg.show(locals())
@@ -333,9 +331,9 @@ def get_subsets(subsets, data, i, subset):
333
331
  subsets.append(subset.copy())
334
332
  return
335
333
  subset.append(data[i])
336
- get_subsets(subsets, data, i+1, subset) # do include data[i]
334
+ get_subsets(subsets, data, i+1, subset) # do include data[i]
337
335
  subset.pop()
338
- get_subsets(subsets, data, i+1, subset) # don't include data[i]
336
+ get_subsets(subsets, data, i+1, subset) # don't include data[i]
339
337
  mg.block(mg.show, mg.stack())
340
338
 
341
339
  def power_set(data):
@@ -429,7 +427,7 @@ Package memory_graph can be very useful in a data structures course, some exampl
429
427
  ```python
430
428
  import memory_graph as mg
431
429
  import random
432
- random.seed(0) # use same random numbers each run
430
+ random.seed(0) # use same random numbers each run
433
431
 
434
432
  class Linked_List:
435
433
  """ Circular doubly linked list """
@@ -455,7 +453,7 @@ n = 100
455
453
  for i in range(n):
456
454
  value = random.randrange(n)
457
455
  linked_list.add_back(value)
458
- mg.block(mg.show, locals()) # <--- draw locals
456
+ mg.block(mg.show, locals()) # <--- draw locals
459
457
  ```
460
458
  ![linked_list.png](https://raw.githubusercontent.com/bterwijn/memory_graph/main/images/linked_list.png)
461
459
 
@@ -489,7 +487,7 @@ class BinTree:
489
487
  self.larger = BinTree(value)
490
488
  else:
491
489
  self.larger.add(value)
492
- mg.block(mg.show, mg.stack()) # <--- draw stack
490
+ mg.block(mg.show, mg.stack()) # <--- draw stack
493
491
 
494
492
  tree = BinTree()
495
493
  n = 100
@@ -508,7 +506,7 @@ Here we show values being inserted in a Binary Tree in Visual Studio Code. When
508
506
  ```python
509
507
  import memory_graph as mg
510
508
  import random
511
- random.seed(0) # use same random numbers each run
509
+ random.seed(0) # use same random numbers each run
512
510
 
513
511
  class HashSet:
514
512
 
@@ -521,7 +519,7 @@ class HashSet:
521
519
  self.buckets[index] = []
522
520
  bucket = self.buckets[index]
523
521
  bucket.append(value)
524
- mg.block(mg.show, locals()) # <--- draw locals
522
+ mg.block(mg.show, locals()) # <--- draw locals
525
523
 
526
524
  def contains(self, value):
527
525
  index = hash(value) % len(self.buckets)
@@ -549,6 +547,9 @@ Here we show values being inserted in a HashSet in PyCharm. When inserting the l
549
547
  # Configuration #
550
548
  Different aspects of memory_graph can be configured. The default configuration can be reset by calling 'mg.config_default.reset()'.
551
549
 
550
+ - ***mg.reopen_viewer*** : bool
551
+ - If True the viewer is reopened each time show() is called, this might change window focus, default True.
552
+
552
553
  - ***mg.config.render_filename*** : str
553
554
  - The default filename to render to, default 'memory_graph.pdf'.
554
555
 
@@ -603,7 +604,7 @@ a = [100, 200, 300]
603
604
  b = a.copy()
604
605
  mg.render(locals(), 'not_node_types1.png')
605
606
 
606
- mg.config.not_node_types.remove(int) # now show separate nodes for int values
607
+ mg.config.not_node_types.remove(int) # now show separate nodes for int values
607
608
 
608
609
  mg.render(locals(), 'not_node_types2.png')
609
610
  ```
@@ -624,51 +625,13 @@ data = [ list(range(20)) for i in range(1,5)]
624
625
  highlight = data[2]
625
626
 
626
627
  mg.show( locals(),
627
- colors = {id(highlight): "red" }, # set color to red
628
- vertical_orientations = {id(highlight): False }, # set horizontal orientation
629
- slicers = {id(highlight): Slicer()} # set no slicing
628
+ colors = {id(highlight): "red" }, # set color to red
629
+ vertical_orientations = {id(highlight): False }, # set horizontal orientation
630
+ slicers = {id(highlight): Slicer()} # set no slicing
630
631
  )
631
632
  ```
632
633
  ![highlight.png](https://raw.githubusercontent.com/bterwijn/memory_graph/main/images/highlight.png)
633
634
 
634
- # Extensions #
635
- Different extensions are available for types from other Python packages.
636
-
637
- ## Numpy ##
638
- Numpy types `array` and `matrix` and `ndarray` can be graphed with "memory_graph.extension_numpy":
639
-
640
- ```python
641
- import memory_graph as mg
642
- import numpy as np
643
- import memory_graph.extension_numpy
644
- np.random.seed(0) # use same random numbers each run
645
-
646
- array = np.array([1.1, 2, 3, 4, 5])
647
- matrix = np.matrix([[i*20+j for j in range(20)] for i in range(20)])
648
- ndarray = np.random.rand(20,20)
649
- mg.show(locals())
650
- ```
651
- ![extension_numpy.png](https://raw.githubusercontent.com/bterwijn/memory_graph/main/images/extension_numpy.png)
652
-
653
- ## Pandas ##
654
- Pandas types `Series` and `DataFrame` can be graphed with "memory_graph.extension_pandas":
655
-
656
- ```python
657
- import memory_graph as mg
658
- import pandas as pd
659
- import memory_graph.extension_pandas
660
-
661
- series = pd.Series( [i for i in range(20)] )
662
- dataframe1 = pd.DataFrame({ "calories": [420, 380, 390],
663
- "duration": [50, 40, 45] })
664
- dataframe2 = pd.DataFrame({ 'Name' : [ 'Tom', 'Anna', 'Steve', 'Lisa'],
665
- 'Age' : [ 28, 34, 29, 42],
666
- 'Length' : [ 1.70, 1.66, 1.82, 1.73] },
667
- index=['one', 'two', 'three', 'four']) # with row names
668
- mg.show(locals())
669
- ```
670
- ![extension_pandas.png](https://raw.githubusercontent.com/bterwijn/memory_graph/main/images/extension_pandas.png)
671
-
672
635
  # Introspection #
673
636
  This section is likely to change. Sometimes the introspection fails or is not as desired. For example the `bintrees.avltree.Node` object doesn't show any attributes in the graph below.
674
637
 
@@ -810,7 +773,7 @@ For binary search we can use a List_View class to represent a particular sublist
810
773
  ```python
811
774
  import memory_graph as mg
812
775
  import random
813
- random.seed(2) # same random numbers each run
776
+ random.seed(2) # same random numbers each run
814
777
 
815
778
  class List_View:
816
779
 
@@ -828,7 +791,7 @@ class List_View:
828
791
  def bin_search(view, value):
829
792
  mid = view.get_mid()
830
793
  if view.begin == mid:
831
- mg.show(mg.stack()) # <--- show stack
794
+ mg.show(mg.stack()) # <--- show stack
832
795
  return view.begin
833
796
  if value < view[mid]:
834
797
  return bin_search(List_View(view.lst, view.begin, mid), value)
@@ -925,6 +888,44 @@ mg.show(locals())
925
888
  ```
926
889
  ![extension_numpy.png](https://raw.githubusercontent.com/bterwijn/memory_graph/main/images/hidden_edges.png)
927
890
 
891
+ # Extensions #
892
+ Different extensions are available for types from other Python packages.
893
+
894
+ ## Numpy ##
895
+ Numpy types `array` and `matrix` and `ndarray` can be graphed with "memory_graph.extension_numpy":
896
+
897
+ ```python
898
+ import memory_graph as mg
899
+ import numpy as np
900
+ import memory_graph.extension_numpy
901
+ np.random.seed(0) # use same random numbers each run
902
+
903
+ array = np.array([1.1, 2, 3, 4, 5])
904
+ matrix = np.matrix([[i*20+j for j in range(20)] for i in range(20)])
905
+ ndarray = np.random.rand(20,20)
906
+ mg.show(locals())
907
+ ```
908
+ ![extension_numpy.png](https://raw.githubusercontent.com/bterwijn/memory_graph/main/images/extension_numpy.png)
909
+
910
+ ## Pandas ##
911
+ Pandas types `Series` and `DataFrame` can be graphed with "memory_graph.extension_pandas":
912
+
913
+ ```python
914
+ import memory_graph as mg
915
+ import pandas as pd
916
+ import memory_graph.extension_pandas
917
+
918
+ series = pd.Series( [i for i in range(20)] )
919
+ dataframe1 = pd.DataFrame({ "calories": [420, 380, 390],
920
+ "duration": [50, 40, 45] })
921
+ dataframe2 = pd.DataFrame({ 'Name' : [ 'Tom', 'Anna', 'Steve', 'Lisa'],
922
+ 'Age' : [ 28, 34, 29, 42],
923
+ 'Length' : [ 1.70, 1.66, 1.82, 1.73] },
924
+ index=['one', 'two', 'three', 'four']) # with row names
925
+ mg.show(locals())
926
+ ```
927
+ ![extension_pandas.png](https://raw.githubusercontent.com/bterwijn/memory_graph/main/images/extension_pandas.png)
928
+
928
929
  # Jupyter Notebook #
929
930
  In Jupyter Notebook `locals()` has additional variables that cause problems in the graph, use `mg.locals_jupyter()` to get the local variables with these problematic variables filtered out. Use `mg.stack_jupyter()` to get the whole call stack with these variables filtered out.
930
931
 
@@ -41,7 +41,7 @@ mg.render(data) # renders to default: 'memory_graph.pdf'
41
41
  ```
42
42
 
43
43
  # Sharing Values #
44
- In Python, assigning the list from variable `a` to variable `b` causes both variables to reference the same list value and thus share it. Consequently, any change applied through one variable will impact the other. This behavior can lead to elusive bugs if a programmer incorrectly assumes that list `a` and `b` are independent.
44
+ In Python, assigning a list from variable `a` to variable `b` causes both variables to reference the same list value and thus share it. Consequently, any change applied through one variable will impact the other. This behavior can lead to elusive bugs if a programmer incorrectly assumes that list `a` and `b` are independent.
45
45
 
46
46
  <table><tr><td>
47
47
 
@@ -80,7 +80,7 @@ b: 4, 3, 2, 1
80
80
  ids: 126432214913216 126432214913216
81
81
  identical?: True
82
82
  ```
83
- A better way to understand what data is shared is to draw a graph of the data using the [memory_graph](https://pypi.org/project/memory-graph/) package.
83
+ A better way to understand what data is shared is to draw a graph using [memory_graph](https://pypi.org/project/memory-graph/).
84
84
 
85
85
  # Chapters #
86
86
 
@@ -88,20 +88,18 @@ A better way to understand what data is shared is to draw a graph of the data us
88
88
 
89
89
  [Call Stack](#call-stack)
90
90
 
91
- [Global Import Trick](#global-import-trick)
92
-
93
91
  [Debugging](#debugging)
94
92
 
95
93
  [Data Structure Examples](#data-structure-examples)
96
94
 
97
95
  [Configuration](#configuration)
98
96
 
99
- [Extensions](#extensions)
100
-
101
97
  [Introspection](#introspection)
102
98
 
103
99
  [Graph Depth](#graph-depth)
104
100
 
101
+ [Extensions](#extensions)
102
+
105
103
  [Jupyter Notebook](#jupyter-notebook)
106
104
 
107
105
  [ipython](#ipython)
@@ -162,7 +160,7 @@ a = [4, 3, 2]
162
160
  b = a
163
161
  mg.render(locals(), 'mutable1.png')
164
162
 
165
- b += [1] # equivalent to: b.append(1)
163
+ b += [1] # equivalent to: b.append(1)
166
164
  mg.render(locals(), 'mutable2.png')
167
165
  ```
168
166
  | ![mutable1.png](https://raw.githubusercontent.com/bterwijn/memory_graph/main/images/mutable1.png) | ![mutable2.png](https://raw.githubusercontent.com/bterwijn/memory_graph/main/images/mutable2.png) |
@@ -178,11 +176,11 @@ Python offers three different "copy" options that we will demonstrate using a ne
178
176
  import memory_graph as mg
179
177
  import copy
180
178
 
181
- a = [ [1, 2], ['x', 'y'] ] # a nested list (a list containing lists)
179
+ a = [ [1, 2], ['x', 'y'] ] # a nested list (a list containing lists)
182
180
 
183
181
  # three different ways to make a "copy" of 'a':
184
182
  c1 = a
185
- c2 = copy.copy(a) # equivalent to: a.copy() a[:] list(a)
183
+ c2 = copy.copy(a) # equivalent to: a.copy() a[:] list(a)
186
184
  c3 = copy.deepcopy(a)
187
185
 
188
186
  mg.show(locals())
@@ -313,9 +311,9 @@ def get_subsets(subsets, data, i, subset):
313
311
  subsets.append(subset.copy())
314
312
  return
315
313
  subset.append(data[i])
316
- get_subsets(subsets, data, i+1, subset) # do include data[i]
314
+ get_subsets(subsets, data, i+1, subset) # do include data[i]
317
315
  subset.pop()
318
- get_subsets(subsets, data, i+1, subset) # don't include data[i]
316
+ get_subsets(subsets, data, i+1, subset) # don't include data[i]
319
317
  mg.block(mg.show, mg.stack())
320
318
 
321
319
  def power_set(data):
@@ -409,7 +407,7 @@ Package memory_graph can be very useful in a data structures course, some exampl
409
407
  ```python
410
408
  import memory_graph as mg
411
409
  import random
412
- random.seed(0) # use same random numbers each run
410
+ random.seed(0) # use same random numbers each run
413
411
 
414
412
  class Linked_List:
415
413
  """ Circular doubly linked list """
@@ -435,7 +433,7 @@ n = 100
435
433
  for i in range(n):
436
434
  value = random.randrange(n)
437
435
  linked_list.add_back(value)
438
- mg.block(mg.show, locals()) # <--- draw locals
436
+ mg.block(mg.show, locals()) # <--- draw locals
439
437
  ```
440
438
  ![linked_list.png](https://raw.githubusercontent.com/bterwijn/memory_graph/main/images/linked_list.png)
441
439
 
@@ -469,7 +467,7 @@ class BinTree:
469
467
  self.larger = BinTree(value)
470
468
  else:
471
469
  self.larger.add(value)
472
- mg.block(mg.show, mg.stack()) # <--- draw stack
470
+ mg.block(mg.show, mg.stack()) # <--- draw stack
473
471
 
474
472
  tree = BinTree()
475
473
  n = 100
@@ -488,7 +486,7 @@ Here we show values being inserted in a Binary Tree in Visual Studio Code. When
488
486
  ```python
489
487
  import memory_graph as mg
490
488
  import random
491
- random.seed(0) # use same random numbers each run
489
+ random.seed(0) # use same random numbers each run
492
490
 
493
491
  class HashSet:
494
492
 
@@ -501,7 +499,7 @@ class HashSet:
501
499
  self.buckets[index] = []
502
500
  bucket = self.buckets[index]
503
501
  bucket.append(value)
504
- mg.block(mg.show, locals()) # <--- draw locals
502
+ mg.block(mg.show, locals()) # <--- draw locals
505
503
 
506
504
  def contains(self, value):
507
505
  index = hash(value) % len(self.buckets)
@@ -529,6 +527,9 @@ Here we show values being inserted in a HashSet in PyCharm. When inserting the l
529
527
  # Configuration #
530
528
  Different aspects of memory_graph can be configured. The default configuration can be reset by calling 'mg.config_default.reset()'.
531
529
 
530
+ - ***mg.reopen_viewer*** : bool
531
+ - If True the viewer is reopened each time show() is called, this might change window focus, default True.
532
+
532
533
  - ***mg.config.render_filename*** : str
533
534
  - The default filename to render to, default 'memory_graph.pdf'.
534
535
 
@@ -583,7 +584,7 @@ a = [100, 200, 300]
583
584
  b = a.copy()
584
585
  mg.render(locals(), 'not_node_types1.png')
585
586
 
586
- mg.config.not_node_types.remove(int) # now show separate nodes for int values
587
+ mg.config.not_node_types.remove(int) # now show separate nodes for int values
587
588
 
588
589
  mg.render(locals(), 'not_node_types2.png')
589
590
  ```
@@ -604,51 +605,13 @@ data = [ list(range(20)) for i in range(1,5)]
604
605
  highlight = data[2]
605
606
 
606
607
  mg.show( locals(),
607
- colors = {id(highlight): "red" }, # set color to red
608
- vertical_orientations = {id(highlight): False }, # set horizontal orientation
609
- slicers = {id(highlight): Slicer()} # set no slicing
608
+ colors = {id(highlight): "red" }, # set color to red
609
+ vertical_orientations = {id(highlight): False }, # set horizontal orientation
610
+ slicers = {id(highlight): Slicer()} # set no slicing
610
611
  )
611
612
  ```
612
613
  ![highlight.png](https://raw.githubusercontent.com/bterwijn/memory_graph/main/images/highlight.png)
613
614
 
614
- # Extensions #
615
- Different extensions are available for types from other Python packages.
616
-
617
- ## Numpy ##
618
- Numpy types `array` and `matrix` and `ndarray` can be graphed with "memory_graph.extension_numpy":
619
-
620
- ```python
621
- import memory_graph as mg
622
- import numpy as np
623
- import memory_graph.extension_numpy
624
- np.random.seed(0) # use same random numbers each run
625
-
626
- array = np.array([1.1, 2, 3, 4, 5])
627
- matrix = np.matrix([[i*20+j for j in range(20)] for i in range(20)])
628
- ndarray = np.random.rand(20,20)
629
- mg.show(locals())
630
- ```
631
- ![extension_numpy.png](https://raw.githubusercontent.com/bterwijn/memory_graph/main/images/extension_numpy.png)
632
-
633
- ## Pandas ##
634
- Pandas types `Series` and `DataFrame` can be graphed with "memory_graph.extension_pandas":
635
-
636
- ```python
637
- import memory_graph as mg
638
- import pandas as pd
639
- import memory_graph.extension_pandas
640
-
641
- series = pd.Series( [i for i in range(20)] )
642
- dataframe1 = pd.DataFrame({ "calories": [420, 380, 390],
643
- "duration": [50, 40, 45] })
644
- dataframe2 = pd.DataFrame({ 'Name' : [ 'Tom', 'Anna', 'Steve', 'Lisa'],
645
- 'Age' : [ 28, 34, 29, 42],
646
- 'Length' : [ 1.70, 1.66, 1.82, 1.73] },
647
- index=['one', 'two', 'three', 'four']) # with row names
648
- mg.show(locals())
649
- ```
650
- ![extension_pandas.png](https://raw.githubusercontent.com/bterwijn/memory_graph/main/images/extension_pandas.png)
651
-
652
615
  # Introspection #
653
616
  This section is likely to change. Sometimes the introspection fails or is not as desired. For example the `bintrees.avltree.Node` object doesn't show any attributes in the graph below.
654
617
 
@@ -790,7 +753,7 @@ For binary search we can use a List_View class to represent a particular sublist
790
753
  ```python
791
754
  import memory_graph as mg
792
755
  import random
793
- random.seed(2) # same random numbers each run
756
+ random.seed(2) # same random numbers each run
794
757
 
795
758
  class List_View:
796
759
 
@@ -808,7 +771,7 @@ class List_View:
808
771
  def bin_search(view, value):
809
772
  mid = view.get_mid()
810
773
  if view.begin == mid:
811
- mg.show(mg.stack()) # <--- show stack
774
+ mg.show(mg.stack()) # <--- show stack
812
775
  return view.begin
813
776
  if value < view[mid]:
814
777
  return bin_search(List_View(view.lst, view.begin, mid), value)
@@ -905,6 +868,44 @@ mg.show(locals())
905
868
  ```
906
869
  ![extension_numpy.png](https://raw.githubusercontent.com/bterwijn/memory_graph/main/images/hidden_edges.png)
907
870
 
871
+ # Extensions #
872
+ Different extensions are available for types from other Python packages.
873
+
874
+ ## Numpy ##
875
+ Numpy types `array` and `matrix` and `ndarray` can be graphed with "memory_graph.extension_numpy":
876
+
877
+ ```python
878
+ import memory_graph as mg
879
+ import numpy as np
880
+ import memory_graph.extension_numpy
881
+ np.random.seed(0) # use same random numbers each run
882
+
883
+ array = np.array([1.1, 2, 3, 4, 5])
884
+ matrix = np.matrix([[i*20+j for j in range(20)] for i in range(20)])
885
+ ndarray = np.random.rand(20,20)
886
+ mg.show(locals())
887
+ ```
888
+ ![extension_numpy.png](https://raw.githubusercontent.com/bterwijn/memory_graph/main/images/extension_numpy.png)
889
+
890
+ ## Pandas ##
891
+ Pandas types `Series` and `DataFrame` can be graphed with "memory_graph.extension_pandas":
892
+
893
+ ```python
894
+ import memory_graph as mg
895
+ import pandas as pd
896
+ import memory_graph.extension_pandas
897
+
898
+ series = pd.Series( [i for i in range(20)] )
899
+ dataframe1 = pd.DataFrame({ "calories": [420, 380, 390],
900
+ "duration": [50, 40, 45] })
901
+ dataframe2 = pd.DataFrame({ 'Name' : [ 'Tom', 'Anna', 'Steve', 'Lisa'],
902
+ 'Age' : [ 28, 34, 29, 42],
903
+ 'Length' : [ 1.70, 1.66, 1.82, 1.73] },
904
+ index=['one', 'two', 'three', 'four']) # with row names
905
+ mg.show(locals())
906
+ ```
907
+ ![extension_pandas.png](https://raw.githubusercontent.com/bterwijn/memory_graph/main/images/extension_pandas.png)
908
+
908
909
  # Jupyter Notebook #
909
910
  In Jupyter Notebook `locals()` has additional variables that cause problems in the graph, use `mg.locals_jupyter()` to get the local variables with these problematic variables filtered out. Use `mg.stack_jupyter()` to get the whole call stack with these variables filtered out.
910
911
 
@@ -1,6 +1,6 @@
1
1
  digraph memory_graph {
2
2
  node [shape=plaintext]
3
- node124959625924160 [label=<
3
+ node137846488649280 [label=<
4
4
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="lightcoral" PORT="table">
5
5
  <TR><TD BORDER="0"><font color="#505050">0</font></TD><TD BORDER="1"> 4 </TD></TR>
6
6
  <TR><TD BORDER="0"><font color="#505050">1</font></TD><TD BORDER="1"> 3 </TD></TR>
@@ -8,30 +8,30 @@ digraph memory_graph {
8
8
  <TR><TD BORDER="0"><font color="#505050">3</font></TD><TD BORDER="1"> 1 </TD></TR>
9
9
  </TABLE>
10
10
  > xlabel=list]
11
- node124959624625536 [label=<
11
+ node137846487401344 [label=<
12
12
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="orange" PORT="table">
13
13
  <TR><TD BORDER="0"><font color="#505050">0</font></TD><TD BORDER="1"> 4 </TD></TR>
14
14
  <TR><TD BORDER="0"><font color="#505050">1</font></TD><TD BORDER="1"> 3 </TD></TR>
15
15
  <TR><TD BORDER="0"><font color="#505050">2</font></TD><TD BORDER="1"> 2 </TD></TR>
16
16
  </TABLE>
17
17
  > xlabel=tuple]
18
- node124959624012928 [label=<
18
+ node137846486738048 [label=<
19
19
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="lightcoral" PORT="table">
20
20
  <TR><TD BORDER="0"><font color="#505050">0</font></TD><TD BORDER="1"> 4 </TD></TR>
21
21
  <TR><TD BORDER="0"><font color="#505050">1</font></TD><TD BORDER="1"> 3 </TD></TR>
22
22
  <TR><TD BORDER="0"><font color="#505050">2</font></TD><TD BORDER="1"> 2 </TD></TR>
23
23
  </TABLE>
24
24
  > xlabel=list]
25
- node124959624571648 [label=<
25
+ node137846487297536 [label=<
26
26
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="#60a5ff" PORT="table">
27
27
  <TR><TD BORDER="1" STYLE="ROUNDED"> a </TD><TD BORDER="1" STYLE="ROUNDED"> b </TD><TD BORDER="1" STYLE="ROUNDED"> c </TD></TR>
28
28
  <TR><TD BORDER="1" PORT="ref0"> </TD><TD BORDER="1" PORT="ref1"> </TD><TD BORDER="1" PORT="ref2"> </TD></TR>
29
29
  </TABLE>
30
30
  > xlabel=dict]
31
- node124959624571648:ref0 -> node124959625924160:table [style=solid]
32
- node124959624571648:ref1 -> node124959624625536:table [style=solid]
33
- node124959624571648:ref2 -> node124959624012928:table [style=solid]
34
- node124959625867120 [label=<
31
+ node137846487297536:ref0 -> node137846488649280:table [style=solid]
32
+ node137846487297536:ref1 -> node137846487401344:table [style=solid]
33
+ node137846487297536:ref2 -> node137846486738048:table [style=solid]
34
+ node137846488592240 [label=<
35
35
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="orange" PORT="table">
36
36
  <TR><TD BORDER="0"><font color="#505050">0</font></TD><TD BORDER="1"> 4 </TD></TR>
37
37
  <TR><TD BORDER="0"><font color="#505050">1</font></TD><TD BORDER="1"> 3 </TD></TR>
@@ -39,7 +39,7 @@ digraph memory_graph {
39
39
  <TR><TD BORDER="0"><font color="#505050">3</font></TD><TD BORDER="1"> 1 </TD></TR>
40
40
  </TABLE>
41
41
  > xlabel=tuple]
42
- node124959624624768 [label=<
42
+ node137846487408320 [label=<
43
43
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="lightcoral" PORT="table">
44
44
  <TR><TD BORDER="0"><font color="#505050">0</font></TD><TD BORDER="1"> 4 </TD></TR>
45
45
  <TR><TD BORDER="0"><font color="#505050">1</font></TD><TD BORDER="1"> 3 </TD></TR>
@@ -47,23 +47,23 @@ digraph memory_graph {
47
47
  <TR><TD BORDER="0"><font color="#505050">3</font></TD><TD BORDER="1"> 1 </TD></TR>
48
48
  </TABLE>
49
49
  > xlabel=list]
50
- node124959625014912 [label=<
50
+ node137846485706304 [label=<
51
51
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="#60a5ff" PORT="table">
52
52
  <TR><TD BORDER="1" STYLE="ROUNDED"> a </TD><TD BORDER="1" STYLE="ROUNDED"> b </TD><TD BORDER="1" STYLE="ROUNDED"> c </TD></TR>
53
53
  <TR><TD BORDER="1" PORT="ref0"> </TD><TD BORDER="1" PORT="ref1"> </TD><TD BORDER="1" PORT="ref2"> </TD></TR>
54
54
  </TABLE>
55
55
  > xlabel=dict]
56
- node124959625014912:ref0 -> node124959625924160:table [style=solid]
57
- node124959625014912:ref1 -> node124959625867120:table [style=solid]
58
- node124959625014912:ref2 -> node124959624624768:table [style=solid]
59
- node124959620219600 [label=<
56
+ node137846485706304:ref0 -> node137846488649280:table [style=solid]
57
+ node137846485706304:ref1 -> node137846488592240:table [style=solid]
58
+ node137846485706304:ref2 -> node137846487408320:table [style=solid]
59
+ node137846482952640 [label=<
60
60
  <TABLE BORDER="3" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="khaki" PORT="table">
61
61
  <TR><TD BORDER="1" STYLE="ROUNDED"> 0: &lt;module&gt; </TD><TD BORDER="1" STYLE="ROUNDED"> 1: add_one </TD></TR>
62
62
  <TR><TD BORDER="1" PORT="ref0"> </TD><TD BORDER="1" PORT="ref1"> </TD></TR>
63
63
  </TABLE>
64
64
  > xlabel=call_stack]
65
- node124959620219600:ref0 -> node124959624571648:table [style=solid]
66
- node124959620219600:ref1 -> node124959625014912:table [style=solid]
67
- subgraph { rank=same; node124959624571648 -> node124959625014912[weight=10, style=invis]; }
68
- subgraph { rank=same; node124959625924160 -> node124959624625536 -> node124959624012928 -> node124959625867120 -> node124959624624768[weight=10, style=invis]; }
65
+ node137846482952640:ref0 -> node137846487297536:table [style=solid]
66
+ node137846482952640:ref1 -> node137846485706304:table [style=solid]
67
+ subgraph { rank=same; node137846487297536 -> node137846485706304[weight=10, style=invis]; }
68
+ subgraph { rank=same; node137846488649280 -> node137846487401344 -> node137846486738048 -> node137846488592240 -> node137846487408320[weight=10, style=invis]; }
69
69
  }
@@ -1,6 +1,6 @@
1
1
  digraph memory_graph {
2
2
  node [shape=plaintext]
3
- node123343309412432 [label=<
3
+ node124963934926736 [label=<
4
4
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="sandybrown" PORT="table">
5
5
  <TR><TD BORDER="1" STYLE="ROUNDED"> left </TD><TD BORDER="1"> None </TD></TR>
6
6
  <TR><TD BORDER="1" STYLE="ROUNDED"> key </TD><TD BORDER="1"> 5 </TD></TR>
@@ -8,7 +8,7 @@ digraph memory_graph {
8
8
  <TR><TD BORDER="1" STYLE="ROUNDED"> right </TD><TD BORDER="1"> None </TD></TR>
9
9
  </TABLE>
10
10
  > xlabel="Node"]
11
- node123343309608640 [label=<
11
+ node124963935172096 [label=<
12
12
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="sandybrown" PORT="table">
13
13
  <TR><TD BORDER="1" STYLE="ROUNDED"> left </TD><TD BORDER="1"> None </TD></TR>
14
14
  <TR><TD BORDER="1" STYLE="ROUNDED"> key </TD><TD BORDER="1"> 15 </TD></TR>
@@ -16,34 +16,34 @@ digraph memory_graph {
16
16
  <TR><TD BORDER="1" STYLE="ROUNDED"> right </TD><TD BORDER="1"> None </TD></TR>
17
17
  </TABLE>
18
18
  > xlabel="Node"]
19
- node123343309608720 [label=<
19
+ node124963935172176 [label=<
20
20
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="sandybrown" PORT="table">
21
21
  <TR><TD BORDER="1" STYLE="ROUNDED"> left </TD><TD BORDER="1" STYLE="ROUNDED"> key </TD><TD BORDER="1" STYLE="ROUNDED"> value </TD><TD BORDER="1" STYLE="ROUNDED"> right </TD></TR>
22
22
  <TR><TD BORDER="1" PORT="ref0"> </TD><TD BORDER="1"> 20 </TD><TD BORDER="1"> twenty </TD><TD BORDER="1"> None </TD></TR>
23
23
  </TABLE>
24
24
  > xlabel="Node"]
25
- node123343309608720:ref0 -> node123343309608640:table [style=solid]
26
- node123343315169136 [label=<
25
+ node124963935172176:ref0 -> node124963935172096:table [style=solid]
26
+ node124963950129008 [label=<
27
27
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="sandybrown" PORT="table">
28
28
  <TR><TD BORDER="1" STYLE="ROUNDED"> left </TD><TD BORDER="1" STYLE="ROUNDED"> key </TD><TD BORDER="1" STYLE="ROUNDED"> value </TD><TD BORDER="1" STYLE="ROUNDED"> right </TD></TR>
29
29
  <TR><TD BORDER="1" PORT="ref0"> </TD><TD BORDER="1"> 10 </TD><TD BORDER="1"> ten </TD><TD BORDER="1" PORT="ref1"> </TD></TR>
30
30
  </TABLE>
31
31
  > xlabel="Node"]
32
- node123343315169136:ref0 -> node123343309412432:table [style=solid]
33
- node123343315169136:ref1 -> node123343309608720:table [style=solid]
34
- node123343310801952 [label=<
32
+ node124963950129008:ref0 -> node124963934926736:table [style=solid]
33
+ node124963950129008:ref1 -> node124963935172176:table [style=solid]
34
+ node124963936489152 [label=<
35
35
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="seagreen1" PORT="table">
36
36
  <TR><TD BORDER="1" STYLE="ROUNDED"> _root </TD><TD BORDER="1" STYLE="ROUNDED"> _count </TD></TR>
37
37
  <TR><TD BORDER="1" PORT="ref0"> </TD><TD BORDER="1"> 4 </TD></TR>
38
38
  </TABLE>
39
39
  > xlabel=AVLTree]
40
- node123343310801952:ref0 -> node123343315169136:table [style=solid]
41
- node123343313520512 [label=<
40
+ node124963936489152:ref0 -> node124963950129008:table [style=solid]
41
+ node124963939125184 [label=<
42
42
  <TABLE BORDER="3" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="#60a5ff" PORT="table">
43
43
  <TR><TD BORDER="1" STYLE="ROUNDED"> tree </TD></TR>
44
44
  <TR><TD BORDER="1" PORT="ref0"> </TD></TR>
45
45
  </TABLE>
46
46
  > xlabel=dict]
47
- node123343313520512:ref0 -> node123343310801952:table [style=solid]
48
- subgraph { rank=same; node123343309412432 -> node123343309608720[weight=10, style=invis]; }
47
+ node124963939125184:ref0 -> node124963936489152:table [style=solid]
48
+ subgraph { rank=same; node124963934926736 -> node124963935172176[weight=10, style=invis]; }
49
49
  }