Shreya Bose

Shreya Bose

Circular Dependencies in Python

PYTHON CIRCULAR DEPENDENCIES

In python, it is possible to import one module or class from inside another. A circular dependency is created when one module is imported from another(directly or indirectly). Circular dependencies cause recursion, leading to infinite looping, failures, tight coupling, and…

Numpy einsum()- Einstein Summations

Numpy Einsum Evaluates The Einstein Summation Convention On The Operands

Einstein summation is used to simplify tensors, matrices, and vector expressions. It is a notational convention. In python, numpy provides a function named, einsum() that can compute the Einstein summation either implicitly or explicitly, as specified. Numpy in the implicit…

Flattening Nested Lists in Python

Flattening Nested Lists In Python

Python lists can be nested in the form of 2d structures as a replacement for arrays in other languages. Since python doesn’t have an array data type, it uses lists to create these 2d, 3d or sometimes N-dimensional arrays. Flattening…