Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dtypes to empty Pandas Series #139

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pyEPR/core_distributed_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,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 @@ -978,7 +978,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 @@ -1098,8 +1098,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 @@ -1242,7 +1242,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 @@ -236,7 +236,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