Skip to content

Instantly share code, notes, and snippets.

View ruihangdu's full-sized avatar

Ruihang Du ruihangdu

  • Some video platform
  • SF Bay Area
View GitHub Profile
import numpy as np
# For simplicity we assume no change of basis and use basis
# [1, 0, 0, ..], [0, 1, 0, ...] ... as the default basis
class Tensor:
def __init__(self, p, q, n, data):
self.data = data
self.cotravariantRank = p