Skip to content
Open
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
6 changes: 3 additions & 3 deletions ssgetpy/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class Matrix:
`isspd` : True if this matrix is symmetric, positive definite
`kind` : The underlying problem domain
"""
CHUNK_SIZE = 16384

attr_list = [
"Id",
Expand Down Expand Up @@ -203,10 +204,9 @@ def download(self, format="MM", destpath=None, extract=False):
with open(localdest, "wb") as outfile, tqdm(
total=content_length, desc=self.name, unit="B"
) as pbar:
for chunk in response.iter_content(chunk_size=4096):
for chunk in response.iter_content(chunk_size=self.CHUNK_SIZE):
outfile.write(chunk)
pbar.update(4096)
time.sleep(0.1)
pbar.update(self.CHUNK_SIZE)

if extract and (format == "MM" or format == "RB"):
bundle.extract(localdest)
Expand Down