Skip to content

Commit

Permalink
Add dtype to empty Pandas Series (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikosavola committed Dec 16, 2022
1 parent aa90e8b commit 233cefe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions pyEPR/core_distributed_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ def calc_Q_external(self, variation, freq_GHz, U_E = None):
'''
if U_E is None:
U_E = self.calc_energy_electric(variation)
Qp = pd.Series({})
Qp = pd.Series({}, dtype='float64')

freq = freq_GHz * 1e9 # freq in Hz
for port_nm, port in self.pinfo.ports.items():
Expand Down Expand Up @@ -980,7 +980,7 @@ def calc_p_junction(self, variation, U_H, U_E, Ljs, Cjs):
method = self.pinfo.options.method_calc_P_mj
I_peak_ = {}
V_peak_ = {}
Sj = pd.Series({})
Sj = pd.Series({}, dtype='float64')
for j_name, j_props in self.pinfo.junctions.items():
logger.debug(f'Calculating participations for {(j_name, j_props)}')
Lj = Ljs[j_name]
Expand Down Expand Up @@ -1100,8 +1100,8 @@ def get_junctions_L_and_C(self, variation: str):
# for all variations and concat
raise NotImplementedError() # TODO
else:
Ljs = pd.Series({})
Cjs = pd.Series({})
Ljs = pd.Series({}, dtype='float64')
Cjs = pd.Series({}, dtype='float64')

for junc_name, val in self.pinfo.junctions.items(): # junction nickname
_variables = self._hfss_variables[variation]
Expand Down Expand Up @@ -1244,7 +1244,7 @@ def do_EPR_analysis(self,
self.set_mode(mode)

# Get HFSS solved frequencies
_Om = pd.Series({})
_Om = pd.Series({}, dtype='float64')
temp_freq = freqs_bare_GHz[mode]
_Om['freq_GHz'] = temp_freq # freq
Om[mode] = _Om
Expand Down
2 changes: 1 addition & 1 deletion pyEPR/project_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def save(self):
return dict(
pinfo=pd.Series(get_instance_vars(self, self._Forbidden)),
dissip=pd.Series(self.dissipative.data()),
options=pd.Series(get_instance_vars(self.options)),
options=pd.Series(get_instance_vars(self.options), dtype='object'),
junctions=pd.DataFrame(self.junctions),
ports=pd.DataFrame(self.ports),
)
Expand Down

0 comments on commit 233cefe

Please sign in to comment.