Flexible and powerful tensor operations for readable and reliable code (for pytorch, jax, TF and others)
This report summarizes scanner evidence for arogozhnikov/einops, a Python project with 9,617 GitHub stars. SynthScan examined 10,195 lines of code across 55 source files, recording 93 pattern matches distributed across 9 syntactic categories. The legacy adjusted pattern signal is 11.1 (Moderate pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 78 finding(s).
Are imports declared and package/API names verified? 9 finding(s).
Are wrappers, guards, and repeated structures necessary? 60 finding(s).
Which changes need focused human review? 93 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 93 distinct pattern matches across 9 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/utils/__init__.py | 7 | def display_np_arrays_as_images(): | CODE |
| LOW | einops/einops.py | 167 | def _reconstruct_from_shape_uncached( | CODE |
| LOW | einops/einops.py | 307 | def _prepare_transformation_recipe( | CODE |
| LOW | einops/einops.py | 469 | def _prepare_recipes_for_all_dims( | CODE |
| LOW | einops/einops.py | 795 | def _validate_einsum_axis_name(axis_name): | CODE |
| LOW | einops/einops.py | 812 | def _compactify_pattern_for_einsum(pattern: str) -> str: | CODE |
| LOW | einops/parsing.py | 127 | def check_axis_name_return_reason(name: str, allow_underscore: bool = False) -> tuple[bool, str]: | CODE |
| LOW | einops/_torch_specific.py | 52 | def stack_on_zeroth_dimension(tensors: list[torch.Tensor]): | CODE |
| LOW | einops/_torch_specific.py | 81 | def apply_for_scriptable_torch( | CODE |
| LOW | einops/_torch_specific.py | 106 | def allow_ops_in_compiled_graph(): | CODE |
| LOW | einops/_backends.py | 104 | def stack_on_zeroth_dimension(self, tensors: list): | CODE |
| LOW | einops/_backends.py | 180 | def stack_on_zeroth_dimension(self, tensors: list): | CODE |
| LOW | einops/_backends.py | 263 | def stack_on_zeroth_dimension(self, tensors: list): | CODE |
| LOW | einops/_backends.py | 314 | def stack_on_zeroth_dimension(self, tensors: list): | CODE |
| LOW | einops/_backends.py | 397 | def stack_on_zeroth_dimension(self, tensors: list): | CODE |
| LOW | einops/_backends.py | 457 | def stack_on_zeroth_dimension(self, tensors: list): | CODE |
| LOW | einops/_backends.py | 517 | def stack_on_zeroth_dimension(self, tensors: list): | CODE |
| LOW | einops/_backends.py | 587 | def stack_on_zeroth_dimension(self, tensors: list): | CODE |
| LOW | einops/_backends.py | 651 | def stack_on_zeroth_dimension(self, tensors: list): | CODE |
| LOW | einops/_backends.py | 708 | def stack_on_zeroth_dimension(self, tensors: list): | CODE |
| LOW | einops/_backends.py | 750 | def stack_on_zeroth_dimension(self, tensors: list): | CODE |
| LOW | einops/tests/test_parsing.py | 31 | def test_elementary_axis_name(): | CODE |
| LOW | einops/tests/test_layers.py | 37 | def test_rearrange_imperative(): | CODE |
| LOW | einops/tests/test_layers.py | 230 | def test_torch_layers_scripting(): | CODE |
| LOW | einops/tests/test_layers.py | 381 | def test_einmix_decomposition(): | CODE |
| LOW | einops/tests/test_layers.py | 471 | def test_einmix_ellipsis_equivalence(): | CODE |
| LOW | einops/tests/__init__.py | 23 | def find_names_of_all_frameworks() -> list[str]: | CODE |
| LOW | einops/tests/test_array_api.py | 42 | def test_reductions_any_all_for_array_api(): | CODE |
| LOW | einops/tests/test_packing.py | 20 | def unpack_and_pack_against_numpy(x, ps, pattern: str): | CODE |
| LOW | einops/tests/test_packing.py | 138 | def test_pack_unpack_with_numpy(): | CODE |
| LOW | einops/tests/test_packing.py | 201 | def test_pack_unpack_against_numpy(): | CODE |
| LOW | einops/tests/test_packing.py | 265 | def test_pack_unpack_array_api(): | CODE |
| LOW | einops/tests/test_ops.py | 44 | def test_collapsed_ellipsis_errors_out(): | CODE |
| LOW | einops/tests/test_ops.py | 100 | def test_ellipsis_ops_imperative(): | CODE |
| LOW | einops/tests/test_ops.py | 117 | def test_rearrange_consistency_numpy(): | CODE |
| LOW | einops/tests/test_ops.py | 155 | def test_rearrange_permutations_numpy(): | CODE |
| LOW | einops/tests/test_ops.py | 183 | def test_reduction_imperatives(): | CODE |
| LOW | einops/tests/test_ops.py | 272 | def test_reduction_stress_imperatives(): | CODE |
| LOW | einops/tests/test_ops.py | 304 | def test_reduction_with_callable_imperatives(): | CODE |
| LOW | einops/tests/test_ops.py | 355 | def test_enumerating_directions(): | CODE |
| LOW | einops/tests/test_ops.py | 370 | def test_concatenations_and_stacking(): | CODE |
| LOW | einops/tests/test_ops.py | 389 | def test_gradients_imperatives(): | CODE |
| LOW | einops/tests/test_ops.py | 549 | def test_torch_compile_with_dynamic_shape(): | CODE |
| LOW | einops/tests/test_ops.py | 582 | def test_reduction_imperatives_booleans(): | CODE |
| LOW | einops/tests/test_other.py | 56 | def test_optimize_transformations_numpy(): | CODE |
| LOW | einops/tests/test_other.py | 93 | def test_parse_shape_imperative(): | CODE |
| LOW | einops/tests/test_other.py | 154 | def test_parse_with_anonymous_axes(): | CODE |
| LOW | einops/tests/test_other.py | 194 | def test_parse_shape_symbolic(backend): | CODE |
| LOW | einops/tests/test_other.py | 222 | def test_parse_shape_symbolic_ellipsis(backend): | CODE |
| LOW | einops/tests/test_other.py | 258 | def test_torch_compile_for_functions(): | CODE |
| LOW | einops/tests/test_other.py | 309 | def test_torch_compile_for_layers(): | CODE |
| LOW | einops/tests/test_examples.py | 153 | def tensor_train_example_numpy(): | CODE |
| LOW | einops/tests/test_examples.py | 194 | def test_pytorch_yolo_fragment(): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | einops/einops.py | 61 | CODE | |
| LOW | einops/einops.py | 307 | CODE | |
| LOW | einops/einops.py | 692 | CODE | |
| LOW | einops/einops.py | 812 | CODE | |
| LOW | einops/parsing.py | 35 | CODE | |
| LOW | einops/parsing.py | 55 | CODE | |
| LOW | einops/_torch_specific.py | 27 | CODE | |
| LOW | einops/_backends.py | 22 | CODE | |
| LOW | einops/_backends.py | 243 | CODE | |
| LOW | einops/_backends.py | 502 | CODE | |
| LOW | einops/layers/_einmix.py | 95 | CODE | |
| LOW | einops/tests/test_layers.py | 37 | CODE | |
| LOW | einops/tests/test_layers.py | 110 | CODE | |
| LOW | einops/tests/test_layers.py | 151 | CODE | |
| LOW | einops/tests/test_layers.py | 471 | CODE | |
| LOW | einops/tests/test_einsum.py | 199 | CODE | |
| LOW | einops/tests/test_einsum.py | 234 | CODE | |
| LOW | einops/tests/test_ops.py | 100 | CODE | |
| LOW | einops/tests/test_ops.py | 219 | CODE | |
| LOW | einops/tests/test_ops.py | 272 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | einops/einops.py | 485 | einops.reduce combines rearrangement and reduction using reader-friendly notation. Some examples: ```pyth | STRING |
| HIGH | einops/einops.py | 570 | einops.rearrange is a reader-friendly smart element reordering for multidimensional tensors. This operation inc | STRING |
| HIGH | einops/einops.py | 882 | einops.einsum calls einsum operations with einops-style named axes indexing, computing tensor products with an | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | einops/tests/test_layers.py | 48 | except BaseException: | CODE |
| HIGH | einops/tests/test_layers.py | 123 | except BaseException: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | einops/__init__.py | 19 | CODE | |
| LOW | einops/__init__.py | 19 | CODE | |
| LOW | einops/__init__.py | 19 | CODE | |
| LOW | einops/__init__.py | 19 | CODE | |
| LOW | einops/__init__.py | 19 | CODE | |
| LOW | einops/__init__.py | 19 | CODE | |
| LOW | einops/__init__.py | 20 | CODE | |
| LOW | einops/__init__.py | 20 | CODE | |
| LOW | einops/_backends.py | 225 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | einops/array_api.py | 156 | except Exception as e: | CODE |
| LOW | einops/packing.py | 184 | except Exception as e: | CODE |
| LOW | einops/tests/test_other.py | 50 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .github/workflows/deploy_docs.yml | 21 | with: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | einops/__init__.py | 17 | __all__ = ["EinopsError", "asnumpy", "einsum", "pack", "parse_shape", "rearrange", "reduce", "repeat", "unpack"] | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | einops/tests/test_examples.py | 250 | CODE |