Skip to content

Commit

Permalink
minor fix typing and np deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabri95 committed Mar 17, 2021
2 parents 0a755fa + c433327 commit 54d0192
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions e2cnn/group/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def subgroup(self, id) -> Tuple[e2cnn.group.Group, Callable, Callable]:
pass

@property
def irreps(self) -> Dict[int, e2cnn.group.IrreducibleRepresentation]:
def irreps(self) -> Dict[str, e2cnn.group.IrreducibleRepresentation]:
r"""
Dictionary containing all irreducible representations (:class:`~e2cnn.group.IrreducibleRepresentation`)
instantiated for this group.
Expand All @@ -163,7 +163,7 @@ def irreps(self) -> Dict[int, e2cnn.group.IrreducibleRepresentation]:
return self._irreps

@property
def representations(self) -> Dict[int, e2cnn.group.Representation]:
def representations(self) -> Dict[str, e2cnn.group.Representation]:
r"""
Dictionary containing all representations (:class:`~e2cnn.group.Representation`)
instantiated for this group.
Expand All @@ -176,7 +176,7 @@ def representations(self) -> Dict[int, e2cnn.group.Representation]:

@property
@abstractmethod
def trivial_representation(self) -> e2cnn.group.Representation:
def trivial_representation(self) -> e2cnn.group.IrreducibleRepresentation:
r"""
Builds the trivial representation of the group.
The trivial representation is a 1-dimensional representation which maps any element to 1,
Expand Down
8 changes: 4 additions & 4 deletions e2cnn/group/representation.py
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ def build_induced_representation(group: e2cnn.group.Group,
character = {}

for g in group.elements:
repr_g = np.zeros((size, size), dtype=np.float)
repr_g = np.zeros((size, size), dtype=float)
for r in representatives:
gr = group.combine(g, r)

Expand Down Expand Up @@ -909,7 +909,7 @@ def build_commuting_matrix(rho: e2cnn.group.IrreducibleRepresentation, t):

# rectangular matrix contained in one of the blocks (associated with the coset containing the trivial element)
# of the change of basis matrix
v = np.zeros((size, repr.size), dtype=np.float)
v = np.zeros((size, repr.size), dtype=float)

# position in the matrix
p = 0
Expand Down Expand Up @@ -1096,8 +1096,8 @@ def null(A: Union[np.matrix, sparse.linalg.LinearOperator],

# print(u.shape, s.shape, vh.shape)
# print(min(s))
null_space = sp.compress((s <= eps), vh, axis=0)
return sp.transpose(null_space)
null_space = np.compress((s <= eps), vh, axis=0)
return np.transpose(null_space)


def find_orthogonal_matrix(basis: np.ndarray, shape):
Expand Down

0 comments on commit 54d0192

Please sign in to comment.