59 lines
2.8 KiB
Plaintext
59 lines
2.8 KiB
Plaintext
Traceback (most recent call last):
|
|
File "/Users/mhjensen/miniforge3/envs/myenv/lib/python3.9/site-packages/jupyter_cache/executors/utils.py", line 51, in single_nb_execution
|
|
executenb(
|
|
File "/Users/mhjensen/miniforge3/envs/myenv/lib/python3.9/site-packages/nbclient/client.py", line 1204, in execute
|
|
return NotebookClient(nb=nb, resources=resources, km=km, **kwargs).execute()
|
|
File "/Users/mhjensen/miniforge3/envs/myenv/lib/python3.9/site-packages/nbclient/util.py", line 84, in wrapped
|
|
return just_run(coro(*args, **kwargs))
|
|
File "/Users/mhjensen/miniforge3/envs/myenv/lib/python3.9/site-packages/nbclient/util.py", line 62, in just_run
|
|
return loop.run_until_complete(coro)
|
|
File "/Users/mhjensen/miniforge3/envs/myenv/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
|
|
return future.result()
|
|
File "/Users/mhjensen/miniforge3/envs/myenv/lib/python3.9/site-packages/nbclient/client.py", line 663, in async_execute
|
|
await self.async_execute_cell(
|
|
File "/Users/mhjensen/miniforge3/envs/myenv/lib/python3.9/site-packages/nbclient/client.py", line 965, in async_execute_cell
|
|
await self._check_raise_for_error(cell, cell_index, exec_reply)
|
|
File "/Users/mhjensen/miniforge3/envs/myenv/lib/python3.9/site-packages/nbclient/client.py", line 862, in _check_raise_for_error
|
|
raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content)
|
|
nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
|
|
------------------
|
|
# Blocking
|
|
@timeFunction
|
|
def blocking(self, blockSizeMax = 500):
|
|
blockSizeMin = 1
|
|
|
|
self.blockSizes = []
|
|
self.meanVec = []
|
|
self.varVec = []
|
|
|
|
for i in range(blockSizeMin, blockSizeMax):
|
|
if(len(self.data) % i != 0):
|
|
pass#continue
|
|
blockSize = i
|
|
meanTempVec = []
|
|
varTempVec = []
|
|
startPoint = 0
|
|
endPoint = blockSize
|
|
|
|
while endPoint <= len(self.data):
|
|
meanTempVec.append(np.average(self.data[startPoint:endPoint]))
|
|
startPoint = endPoint
|
|
endPoint += blockSize
|
|
mean, var = np.average(meanTempVec), np.var(meanTempVec)/len(meanTempVec)
|
|
self.meanVec.append(mean)
|
|
self.varVec.append(var)
|
|
self.blockSizes.append(blockSize)
|
|
|
|
self.blockingAvg = np.average(self.meanVec[-200:])
|
|
self.blockingVar = (np.average(self.varVec[-200:]))
|
|
self.blockingStd = np.sqrt(self.blockingVar)
|
|
------------------
|
|
|
|
[0;36m File [0;32m"<ipython-input-6-2ff97f4bf03b>"[0;36m, line [0;32m2[0m
|
|
[0;31m @timeFunction[0m
|
|
[0m ^[0m
|
|
[0;31mIndentationError[0m[0;31m:[0m unexpected indent
|
|
|
|
IndentationError: unexpected indent (<ipython-input-6-2ff97f4bf03b>, line 2)
|
|
|