Analyzed Root:
/data2/TensorVis
TensorVis.vis(containsif __name__ == '__main__')TensorVis.cli(containsif __name__ == '__main__')TensorVis.op_viz(containsif __name__ == '__main__')
| Complexity | Function | Args |
|---|---|---|
| 34 lines | TensorVis.op_viz.visualize_matmul |
(A, B, title) |
| 21 lines | TensorVis.inspector.inspect |
(self) |
| 21 lines | TensorVis.vis.inspect |
(self) |
| 14 lines | TensorVis.inspector.visualize |
(self) |
| 14 lines | TensorVis.vis.visualize |
(self) |
| 14 lines | TensorVis.op_viz.visualize_broadcast_add |
(A, B, title) |
| 8 lines | TensorVis.cli.inspect_random |
(shape, name) |
| 7 lines | TensorVis.inspector._guess_dim_names |
(self) |
| 7 lines | TensorVis.vis._guess_dim_names |
(self) |
| 7 lines | TensorVis.op_viz._plot_matrix |
(ax, mat, title) |
graph TD
classDef internal fill:#f96,stroke:#333,stroke-width:2px;
classDef external fill:#9cf,stroke:#333,stroke-width:1px;
TensorVis_inspector["TensorVis.inspector"] --> ext_numpy["numpy"]
class TensorVis_inspector internal;
class ext_numpy external;
TensorVis_inspector["TensorVis.inspector"] --> ext_matplotlib["matplotlib"]
class TensorVis_inspector internal;
class ext_matplotlib external;
TensorVis_inspector["TensorVis.inspector"] --> ext_itertools["itertools"]
class TensorVis_inspector internal;
class ext_itertools external;
TensorVis_vis["TensorVis.vis"] --> ext_numpy["numpy"]
class TensorVis_vis internal;
class ext_numpy external;
TensorVis_vis["TensorVis.vis"] --> ext_matplotlib["matplotlib"]
class TensorVis_vis internal;
class ext_matplotlib external;
TensorVis_vis["TensorVis.vis"] --> ext_itertools["itertools"]
class TensorVis_vis internal;
class ext_itertools external;
TensorVis_cli["TensorVis.cli"] --> ext_typer["typer"]
class TensorVis_cli internal;
class ext_typer external;
TensorVis_cli["TensorVis.cli"] --> ext_numpy["numpy"]
class TensorVis_cli internal;
class ext_numpy external;
TensorVis_cli["TensorVis.cli"] --> ext_typing["typing"]
class TensorVis_cli internal;
class ext_typing external;
TensorVis_cli["TensorVis.cli"] --> ext_inspector["inspector"]
class TensorVis_cli internal;
class ext_inspector external;
TensorVis_cli["TensorVis.cli"] --> ext_op_viz["op_viz"]
class TensorVis_cli internal;
class ext_op_viz external;
TensorVis_op_viz["TensorVis.op_viz"] --> ext_numpy["numpy"]
class TensorVis_op_viz internal;
class ext_numpy external;
TensorVis_op_viz["TensorVis.op_viz"] --> ext_matplotlib["matplotlib"]
class TensorVis_op_viz internal;
class ext_matplotlib external;
flowchart TD
classDef input fill:#e3f2fd,stroke:#1565c0;
classDef process fill:#fff,stroke:#bdbdbd;
classDef decision fill:#f3e5f5,stroke:#7b1fa2,stroke-dasharray: 5 5;
Start([Input: A, B, title]):::input
N1["Expr"]:::process
Start --> N1
N2{"If hasattr(A, 'detach')?"}:::decision
N1 --> N2
N3["Call: numpy -> A"]:::process
N2 --> N3
N4["Merge"]:::process
N2 --> N4
N3 --> N4
N5{"If hasattr(B, 'detach')?"}:::decision
N4 --> N5
N6["Call: numpy -> B"]:::process
N5 --> N6
N7["Merge"]:::process
N5 --> N7
N6 --> N7
N8["Call: array -> A"]:::process
N7 --> N8
N9["Call: array -> B"]:::process
N8 --> N9
N10{"If A.ndim != 2 or B.ndim != 2?"}:::decision
N9 --> N10
N11["Call: print"]:::process
N10 --> N11
N12([Return]):::input
N11 --> N12
N13["Merge"]:::process
N10 --> N13
N12 --> N13
N14{"If A.shape[1] != B.shape[0]?"}:::decision
N13 --> N14
N15["Call: print"]:::process
N14 --> N15
N16([Return]):::input
N15 --> N16
N17["Merge"]:::process
N14 --> N17
N16 --> N17
N18["Process -> C"]:::process
N17 --> N18
N19["Call: figure -> fig"]:::process
N18 --> N19
N20["Call: subplot2grid -> ax_A"]:::process
N19 --> N20
N21["Call: subplot2grid -> ax_B"]:::process
N20 --> N21
N22["Call: subplot2grid -> ax_C"]:::process
N21 --> N22
N23["Call: subplot2grid -> ax_Eq"]:::process
N22 --> N23
N24["Call: _plot_matrix"]:::process
N23 --> N24
N25["Call: _plot_matrix"]:::process
N24 --> N25
N26["Call: _plot_matrix"]:::process
N25 --> N26
N27["Call: Rectangle -> rect_A"]:::process
N26 --> N27
N28["Call: add_patch"]:::process
N27 --> N28
N29["Call: Rectangle -> rect_B"]:::process
N28 --> N29
N30["Call: add_patch"]:::process
N29 --> N30
N31["Call: Rectangle -> rect_C"]:::process
N30 --> N31
N32["Call: add_patch"]:::process
N31 --> N32
N33["Process -> row_vec"]:::process
N32 --> N33
N34["Process -> col_vec"]:::process
N33 --> N34
N35["Process -> terms"]:::process
N34 --> N35
N36{"For (a, b)?"}:::decision
N35 --> N36
N37["Call: append"]:::process
N36 --> N37
N38["After For"]:::process
N37 --> N36
N36 --> N38
N39["Call: join -> dot_product_str"]:::process
N38 --> N39
N40["Call: dot -> result"]:::process
N39 --> N40
N41["Process -> formula_text"]:::process
N40 --> N41
N42["Call: text"]:::process
N41 --> N42
N43["Call: axis"]:::process
N42 --> N43
N44["Call: suptitle"]:::process
N43 --> N44
N45["Call: tight_layout"]:::process
N44 --> N45
N46["Call: show"]:::process
N45 --> N46
N47([End]):::input
N46 --> N47
flowchart TD
classDef input fill:#e3f2fd,stroke:#1565c0;
classDef process fill:#fff,stroke:#bdbdbd;
classDef decision fill:#f3e5f5,stroke:#7b1fa2,stroke-dasharray: 5 5;
Start([Input: self]):::input
N1["Expr"]:::process
Start --> N1
N2["Call: print"]:::process
N1 --> N2
N3["Call: print"]:::process
N2 --> N3
N4["Call: _guess_dim_names -> dim_names"]:::process
N3 --> N4
N5["Call: join -> shape_str"]:::process
N4 --> N5
N6["Call: print"]:::process
N5 --> N6
N7["Call: print"]:::process
N6 --> N7
N8["Call: print"]:::process
N7 --> N8
N9["Call: print"]:::process
N8 --> N9
N10["Call: any -> has_nan"]:::process
N9 --> N10
N11["Call: any -> has_inf"]:::process
N10 --> N11
N12["Call: print"]:::process
N11 --> N12
N13["Call: print"]:::process
N12 --> N13
N14["Call: print"]:::process
N13 --> N14
N15{"If self.size > 0?"}:::decision
N14 --> N15
N16["Process -> assign"]:::process
N15 --> N16
N17["Call: print"]:::process
N16 --> N17
N18["Call: print"]:::process
N17 --> N18
N19["Call: sum -> zeros"]:::process
N18 --> N19
N20["Process -> sparsity"]:::process
N19 --> N20
N21["Call: print"]:::process
N20 --> N21
N22["Merge"]:::process
N15 --> N22
N21 --> N22
N23["Call: print"]:::process
N22 --> N23
N24["Call: sum -> l1"]:::process
N23 --> N24
N25["Call: norm -> l2"]:::process
N24 --> N25
N26["Call: print"]:::process
N25 --> N26
N27{"If self.ndim >= 2 and self.size > 0 and (not has_nan) and (not has_inf)?"}:::decision
N26 --> N27
N28["Process -> matrix"]:::process
N27 --> N28
N29{"While matrix.ndim > 2?"}:::decision
N28 --> N29
N30["Process -> matrix"]:::process
N29 --> N30
N31["After While"]:::process
N30 --> N29
N29 --> N31
N32["Try"]:::process
N31 --> N32
N33["Merge"]:::process
N27 --> N33
N32 --> N33
N34["Call: print"]:::process
N33 --> N34
N35([End]):::input
N34 --> N35
flowchart TD
classDef input fill:#e3f2fd,stroke:#1565c0;
classDef process fill:#fff,stroke:#bdbdbd;
classDef decision fill:#f3e5f5,stroke:#7b1fa2,stroke-dasharray: 5 5;
Start([Input: self]):::input
N1["Expr"]:::process
Start --> N1
N2["Call: print"]:::process
N1 --> N2
N3["Call: print"]:::process
N2 --> N3
N4["Call: _guess_dim_names -> dim_names"]:::process
N3 --> N4
N5["Call: join -> shape_str"]:::process
N4 --> N5
N6["Call: print"]:::process
N5 --> N6
N7["Call: print"]:::process
N6 --> N7
N8["Call: print"]:::process
N7 --> N8
N9["Call: print"]:::process
N8 --> N9
N10["Call: any -> has_nan"]:::process
N9 --> N10
N11["Call: any -> has_inf"]:::process
N10 --> N11
N12["Call: print"]:::process
N11 --> N12
N13["Call: print"]:::process
N12 --> N13
N14["Call: print"]:::process
N13 --> N14
N15{"If self.size > 0?"}:::decision
N14 --> N15
N16["Process -> assign"]:::process
N15 --> N16
N17["Call: print"]:::process
N16 --> N17
N18["Call: print"]:::process
N17 --> N18
N19["Call: sum -> zeros"]:::process
N18 --> N19
N20["Process -> sparsity"]:::process
N19 --> N20
N21["Call: print"]:::process
N20 --> N21
N22["Merge"]:::process
N15 --> N22
N21 --> N22
N23["Call: print"]:::process
N22 --> N23
N24["Call: sum -> l1"]:::process
N23 --> N24
N25["Call: norm -> l2"]:::process
N24 --> N25
N26["Call: print"]:::process
N25 --> N26
N27{"If self.ndim >= 2 and self.size > 0 and (not has_nan) and (not has_inf)?"}:::decision
N26 --> N27
N28["Process -> matrix"]:::process
N27 --> N28
N29{"While matrix.ndim > 2?"}:::decision
N28 --> N29
N30["Process -> matrix"]:::process
N29 --> N30
N31["After While"]:::process
N30 --> N29
N29 --> N31
N32["Try"]:::process
N31 --> N32
N33["Merge"]:::process
N27 --> N33
N32 --> N33
N34["Call: print"]:::process
N33 --> N34
N35([End]):::input
N34 --> N35
flowchart TD
classDef input fill:#e3f2fd,stroke:#1565c0;
classDef process fill:#fff,stroke:#bdbdbd;
classDef decision fill:#f3e5f5,stroke:#7b1fa2,stroke-dasharray: 5 5;
Start([Input: self]):::input
N1["Expr"]:::process
Start --> N1
N2["Call: use"]:::process
N1 --> N2
N3["Call: figure -> fig"]:::process
N2 --> N3
N4["Call: add_gridspec -> gs"]:::process
N3 --> N4
N5["Call: add_subplot -> ax1"]:::process
N4 --> N5
N6["Call: flatten -> flat_data"]:::process
N5 --> N6
N7["Process -> clean_data"]:::process
N6 --> N7
N8{"If len(clean_data) > 0?"}:::decision
N7 --> N8
N9["Call: hist"]:::process
N8 --> N9
N10["Call: axvline"]:::process
N9 --> N10
N11["Call: set_title"]:::process
N10 --> N11
N12["Call: set_xlabel"]:::process
N11 --> N12
N13["Call: set_ylabel"]:::process
N12 --> N13
N14["Call: legend"]:::process
N13 --> N14
N15["Call: text"]:::process
N8 --> N15
N16["Merge"]:::process
N15 --> N16
N14 --> N16
N17["Call: add_subplot -> ax2"]:::process
N16 --> N17
N18{"If self.ndim == 1?"}:::decision
N17 --> N18
N19["Call: bar"]:::process
N18 --> N19
N20["Call: set_title"]:::process
N19 --> N20
N21{"If self.ndim == 2?"}:::decision
N18 --> N21
N22["Call: imshow -> im"]:::process
N21 --> N22
N23["Call: colorbar"]:::process
N22 --> N23
N24["Call: set_title"]:::process
N23 --> N24
N25{"If self.ndim >= 3?"}:::decision
N21 --> N25
N26["Process -> slice_data"]:::process
N25 --> N26
N27{"While slice_data.ndim > 3?"}:::decision
N26 --> N27
N28["Process -> slice_data"]:::process
N27 --> N28
N29["After While"]:::process
N28 --> N27
N27 --> N29
N30{"If slice_data.shape[0] > slice_data.shape[-1] and slice_data.shape[-1] > 1?"}:::decision
N29 --> N30
N31["Call: transpose -> slice_data"]:::process
N30 --> N31
N32["Merge"]:::process
N30 --> N32
N31 --> N32
N33["Call: min -> num_slices"]:::process
N32 --> N33
N34["Process -> assign"]:::process
N33 --> N34
N35["Call: zeros -> montage"]:::process
N34 --> N35
N36{"For i?"}:::decision
N35 --> N36
N37["Process -> assign"]:::process
N36 --> N37
N38["After For"]:::process
N37 --> N36
N36 --> N38
N39["Call: imshow -> im"]:::process
N38 --> N39
N40["Call: colorbar"]:::process
N39 --> N40
N41["Call: set_title"]:::process
N40 --> N41
N42["Call: axis"]:::process
N41 --> N42
N43["Merge"]:::process
N25 --> N43
N42 --> N43
N44["Merge"]:::process
N43 --> N44
N24 --> N44
N45["Merge"]:::process
N44 --> N45
N20 --> N45
N46["Call: add_subplot -> ax3"]:::process
N45 --> N46
N47{"If self.ndim >= 2 and self.size > 0?"}:::decision
N46 --> N47
N48["Process -> matrix"]:::process
N47 --> N48
N49{"While matrix.ndim > 2?"}:::decision
N48 --> N49
N50["Process -> matrix"]:::process
N49 --> N50
N51["After While"]:::process
N50 --> N49
N49 --> N51
N52["Try"]:::process
N51 --> N52
N53["Call: text"]:::process
N47 --> N53
N54["Call: axis"]:::process
N53 --> N54
N55["Merge"]:::process
N54 --> N55
N52 --> N55
N56["Call: tight_layout"]:::process
N55 --> N56
N57["Call: show"]:::process
N56 --> N57
N58([End]):::input
N57 --> N58
flowchart TD
classDef input fill:#e3f2fd,stroke:#1565c0;
classDef process fill:#fff,stroke:#bdbdbd;
classDef decision fill:#f3e5f5,stroke:#7b1fa2,stroke-dasharray: 5 5;
Start([Input: self]):::input
N1["Expr"]:::process
Start --> N1
N2["Call: use"]:::process
N1 --> N2
N3["Call: figure -> fig"]:::process
N2 --> N3
N4["Call: add_gridspec -> gs"]:::process
N3 --> N4
N5["Call: add_subplot -> ax1"]:::process
N4 --> N5
N6["Call: flatten -> flat_data"]:::process
N5 --> N6
N7["Process -> clean_data"]:::process
N6 --> N7
N8{"If len(clean_data) > 0?"}:::decision
N7 --> N8
N9["Call: hist"]:::process
N8 --> N9
N10["Call: axvline"]:::process
N9 --> N10
N11["Call: set_title"]:::process
N10 --> N11
N12["Call: set_xlabel"]:::process
N11 --> N12
N13["Call: set_ylabel"]:::process
N12 --> N13
N14["Call: legend"]:::process
N13 --> N14
N15["Call: text"]:::process
N8 --> N15
N16["Merge"]:::process
N15 --> N16
N14 --> N16
N17["Call: add_subplot -> ax2"]:::process
N16 --> N17
N18{"If self.ndim == 1?"}:::decision
N17 --> N18
N19["Call: bar"]:::process
N18 --> N19
N20["Call: set_title"]:::process
N19 --> N20
N21{"If self.ndim == 2?"}:::decision
N18 --> N21
N22["Call: imshow -> im"]:::process
N21 --> N22
N23["Call: colorbar"]:::process
N22 --> N23
N24["Call: set_title"]:::process
N23 --> N24
N25{"If self.ndim >= 3?"}:::decision
N21 --> N25
N26["Process -> slice_data"]:::process
N25 --> N26
N27{"While slice_data.ndim > 3?"}:::decision
N26 --> N27
N28["Process -> slice_data"]:::process
N27 --> N28
N29["After While"]:::process
N28 --> N27
N27 --> N29
N30{"If slice_data.shape[0] > slice_data.shape[-1] and slice_data.shape[-1] > 1?"}:::decision
N29 --> N30
N31["Call: transpose -> slice_data"]:::process
N30 --> N31
N32["Merge"]:::process
N30 --> N32
N31 --> N32
N33["Call: min -> num_slices"]:::process
N32 --> N33
N34["Process -> assign"]:::process
N33 --> N34
N35["Call: zeros -> montage"]:::process
N34 --> N35
N36{"For i?"}:::decision
N35 --> N36
N37["Process -> assign"]:::process
N36 --> N37
N38["After For"]:::process
N37 --> N36
N36 --> N38
N39["Call: imshow -> im"]:::process
N38 --> N39
N40["Call: colorbar"]:::process
N39 --> N40
N41["Call: set_title"]:::process
N40 --> N41
N42["Call: axis"]:::process
N41 --> N42
N43["Merge"]:::process
N25 --> N43
N42 --> N43
N44["Merge"]:::process
N43 --> N44
N24 --> N44
N45["Merge"]:::process
N44 --> N45
N20 --> N45
N46["Call: add_subplot -> ax3"]:::process
N45 --> N46
N47{"If self.ndim >= 2 and self.size > 0?"}:::decision
N46 --> N47
N48["Process -> matrix"]:::process
N47 --> N48
N49{"While matrix.ndim > 2?"}:::decision
N48 --> N49
N50["Process -> matrix"]:::process
N49 --> N50
N51["After While"]:::process
N50 --> N49
N49 --> N51
N52["Try"]:::process
N51 --> N52
N53["Call: text"]:::process
N47 --> N53
N54["Call: axis"]:::process
N53 --> N54
N55["Merge"]:::process
N54 --> N55
N52 --> N55
N56["Call: tight_layout"]:::process
N55 --> N56
N57["Call: show"]:::process
N56 --> N57
N58([End]):::input
N57 --> N58
-
Repository index: INDEX.md (HTML: INDEX.html)
-
Merged dynamic report: Tensorvis_merged_dynamic.md (HTML: Tensorvis_merged_dynamic.html)
-
Static report (HTML): Tensorvis.html