Pinned Loading
-
-
-
-
Transpose and Complex Conjugate of a...
Transpose and Complex Conjugate of a matrix 1# Computes the transpose and complex conjugate of a matrix.
2from typing import List, Callable
34# Compute the transpose of a matrix. This is definitely not the
5# fastest implementation.
-
Circular buffer for compactly storin...
Circular buffer for compactly storing elements 1class CircularBuffer:
2def __init__(self, max_len) -> None:
3self.max_len = max_len
4self.a = [None] * max_len
5self.idx = 0
-
Converts a list to a 2D list
Converts a list to a 2D list 1def make_2d(i,j,a):
2if len(a) != i * j:
3raise ValueError("List of length {} can't be resized to {} by {}".format(len(a), i, j))
4return [[a[x*i+y] for y in range(i)] for x in range(j)]
5
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.