Skip to content

Commit 78175f5

Browse files
committed
convert build_navdata to private function
1 parent 6ef0e0b commit 78175f5

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

gnss_lib_py/parsers/navdata.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def __init__(self, csv_path=None, pandas_df=None, numpy_array=None,
5050
elif numpy_array is not None:
5151
self.from_numpy_array(numpy_array)
5252
else:
53-
self.build_navdata()
53+
self._build_navdata()
5454

5555
self.rename(self._row_map(), inplace=True)
5656

@@ -60,7 +60,7 @@ def postprocess(self):
6060
"""Postprocess loaded data. Optional in subclass
6161
"""
6262

63-
def build_navdata(self):
63+
def _build_navdata(self):
6464
"""Build attributes for NavData.
6565
6666
"""
@@ -85,7 +85,7 @@ def from_csv_path(self, csv_path, **kwargs):
8585
if not os.path.exists(csv_path):
8686
raise OSError("file not found")
8787

88-
self.build_navdata()
88+
self._build_navdata()
8989

9090
pandas_df = pd.read_csv(csv_path, **kwargs)
9191
self.from_pandas_df(pandas_df)
@@ -106,7 +106,7 @@ def from_pandas_df(self, pandas_df):
106106
# class they need to be strings
107107
pandas_df.rename(str, axis="columns", inplace=True)
108108

109-
self.build_navdata()
109+
self._build_navdata()
110110

111111
for _, col_name in enumerate(pandas_df.columns):
112112
new_value = pandas_df[col_name].to_numpy()
@@ -125,7 +125,7 @@ def from_numpy_array(self, numpy_array):
125125
if not isinstance(numpy_array, np.ndarray):
126126
raise TypeError("numpy_array must be np.ndarray")
127127

128-
self.build_navdata()
128+
self._build_navdata()
129129

130130
for row_num in range(numpy_array.shape[0]):
131131
self[str(row_num)] = numpy_array[row_num,:]
@@ -310,7 +310,6 @@ def _get_set_str_rows(self, rows, new_value):
310310
# changed from string to numeric
311311
self.str_map[self.inv_map[row]] = {}
312312

313-
314313
return row_list, row_str_new
315314

316315
def __getitem__(self, key_idx):

0 commit comments

Comments
 (0)