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

MAINT: SPEC0 test env, clean up python 3.6 #250

Draft
wants to merge 16 commits into
base: develop
Choose a base branch
from
Prev Previous commit
Next Next commit
BUG: cdflib syntax
jklenzing committed Nov 25, 2024
commit 6ce617d6eb7cd5a333a568b4a51d7e39c7f5f1a2
10 changes: 3 additions & 7 deletions pysatNASA/instruments/methods/_cdf.py
Original file line number Diff line number Diff line change
@@ -100,12 +100,8 @@ def __init__(self, filename,
self.meta = {}
self._dependencies = {}

if hasattr(self._cdf_info, 'rVariables'):
self._variable_names = (self._cdf_info.rVariables
+ self._cdf_info.zVariables)
else:
self._variable_names = (self._cdf_info['rVariables']
+ self._cdf_info['zVariables'])
self._variable_names = (self._cdf_info.rVariables
+ self._cdf_info.zVariables)

self.load_variables()

@@ -311,7 +307,7 @@ def load_variables(self):
if not re.match(var_regex, variable_name):
# Skip this variable
continue
var_atts = self._cdf_file.varattsget(variable_name, to_np=True)
var_atts = self._cdf_file.varattsget(variable_name)

for k in var_atts:
var_atts[k] = var_atts[k] # [0]