Skip to content

Commit

Permalink
declare type hint of neural state
Browse files Browse the repository at this point in the history
  • Loading branch information
knikolaou committed May 10, 2024
1 parent e1128ed commit ae13f23
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion papyrus/measurements/base_measurement.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

from abc import ABC
from inspect import signature
from typing import List

import numpy as np

Expand Down Expand Up @@ -81,7 +82,7 @@ def __init__(self, name: str, rank: int, public: bool = False):
raise ValueError("Rank must be a positive integer.")

# Get the neural state keys that the measurement takes as input
self.neural_state_keys = []
self.neural_state_keys: List[str] = []
self.neural_state_keys.extend(signature(self.apply).parameters.keys())

def apply(self, *args: np.ndarray, **kwargs: np.ndarray) -> np.ndarray:
Expand Down

0 comments on commit ae13f23

Please sign in to comment.