Skip to content

Instantly share code, notes, and snippets.

@NickSale
Created June 24, 2020 17:46
Show Gist options
  • Save NickSale/3d00e0e765b849ffb84592815158fe5a to your computer and use it in GitHub Desktop.
Save NickSale/3d00e0e765b849ffb84592815158fe5a to your computer and use it in GitHub Desktop.
PersistenceImage Output
---------------------------------------------------------------------------
_RemoteTraceback Traceback (most recent call last)
_RemoteTraceback:
"""
Traceback (most recent call last):
File "C:\Users\nicho\Anaconda3\lib\site-packages\joblib\externals\loky\process_executor.py", line 418, in _process_worker
r = call_item()
File "C:\Users\nicho\Anaconda3\lib\site-packages\joblib\externals\loky\process_executor.py", line 272, in __call__
return self.fn(*self.args, **self.kwargs)
File "C:\Users\nicho\Anaconda3\lib\site-packages\joblib\_parallel_backends.py", line 567, in __call__
return self.func(*args, **kwargs)
File "C:\Users\nicho\Anaconda3\lib\site-packages\joblib\parallel.py", line 225, in __call__
for func, args, kwargs in self.items]
File "C:\Users\nicho\Anaconda3\lib\site-packages\joblib\parallel.py", line 225, in <listcomp>
for func, args, kwargs in self.items]
File "C:\Users\nicho\Anaconda3\lib\site-packages\gtda\diagrams\_metrics.py", line 102, in persistence_images
diagrams[:, :, 1] = diagrams[:, :, 1] - diagrams[:, :, 0]
ValueError: assignment destination is read-only
"""
The above exception was the direct cause of the following exception:
ValueError Traceback (most recent call last)
<ipython-input-177-9725a0e40e99> in <module>
8 diagrams[1, :, 1] += 1
9 pi = PersistenceImage(sigma=1, n_bins=n_bins, n_jobs=2)
---> 10 x_t = pi.fit_transform(diagrams)
~\Anaconda3\lib\site-packages\gtda\utils\_docs.py in fit_transform_wrapper(*args, **kwargs)
104 @wraps(original_fit_transform)
105 def fit_transform_wrapper(*args, **kwargs):
--> 106 return original_fit_transform(*args, **kwargs)
107 fit_transform_wrapper.__doc__ = \
108 make_fit_transform_docs(fit_docs, transform_docs)
~\Anaconda3\lib\site-packages\sklearn\base.py in fit_transform(self, X, y, **fit_params)
569 if y is None:
570 # fit method of arity 1 (unsupervised transformation)
--> 571 return self.fit(X, **fit_params).transform(X)
572 else:
573 # fit method of arity 2 (supervised transformation)
<ipython-input-167-4ed6d3909366> in transform(self, X, y)
20 self.weights_[dim],
21 self.sigma)
---> 22 for dim in self.homology_dimensions_
23 for s in gen_even_slices(X.shape[0],
24 effective_n_jobs(self.n_jobs))
~\Anaconda3\lib\site-packages\joblib\parallel.py in __call__(self, iterable)
932
933 with self._backend.retrieval_context():
--> 934 self.retrieve()
935 # Make sure that we get a last message telling us we are done
936 elapsed_time = time.time() - self._start_time
~\Anaconda3\lib\site-packages\joblib\parallel.py in retrieve(self)
831 try:
832 if getattr(self._backend, 'supports_timeout', False):
--> 833 self._output.extend(job.get(timeout=self.timeout))
834 else:
835 self._output.extend(job.get())
~\Anaconda3\lib\site-packages\joblib\_parallel_backends.py in wrap_future_result(future, timeout)
519 AsyncResults.get from multiprocessing."""
520 try:
--> 521 return future.result(timeout=timeout)
522 except LokyTimeoutError:
523 raise TimeoutError()
~\Anaconda3\lib\concurrent\futures\_base.py in result(self, timeout)
430 raise CancelledError()
431 elif self._state == FINISHED:
--> 432 return self.__get_result()
433 else:
434 raise TimeoutError()
~\Anaconda3\lib\concurrent\futures\_base.py in __get_result(self)
382 def __get_result(self):
383 if self._exception:
--> 384 raise self._exception
385 else:
386 return self._result
ValueError: assignment destination is read-only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment