Skip to content

Commit d762468

Browse files
committed
Update vectorize parameters
1 parent fa568b5 commit d762468

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

persim/landscapes/tools.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def average_approx(
141141

142142

143143
def vectorize(
144-
l: PersLandscapeExact, start: float = None, stop: float = None, num_dims: int = 500
144+
l: PersLandscapeExact, start: float = None, stop: float = None, num_steps: int = 500
145145
) -> PersLandscapeApprox:
146146
"""Converts a `PersLandscapeExact` type to a `PersLandscapeApprox` type.
147147
@@ -162,10 +162,10 @@ def vectorize(
162162

163163
l.compute_landscape()
164164
if start is None:
165-
start = min(l.critical_pairs, key=itemgetter(0))[0]
165+
start = min(l.critical_pairs[0], key=itemgetter(0))[0]
166166
if stop is None:
167-
stop = max(l.critical_pairs, key=itemgetter(0))[0]
168-
grid = np.linspace(start, stop, num_dims)
167+
stop = max(l.critical_pairs[0], key=itemgetter(0))[0]
168+
grid = np.linspace(start, stop, num_steps)
169169
result = []
170170
# creates sequential pairs of points for each lambda in critical_pairs
171171
for depth in l.critical_pairs:
@@ -174,7 +174,7 @@ def vectorize(
174174
return PersLandscapeApprox(
175175
start=start,
176176
stop=stop,
177-
num_dims=num_dims,
177+
num_steps=num_steps,
178178
hom_deg=l.hom_deg,
179179
values=np.array(result),
180180
)

0 commit comments

Comments
 (0)