Comments (4)
Bug report by Marlene Kretschmer (I experienced simmilar problems several time before):
*... konstruieren ich gerade probeweise mid-latitude networks (1872 Knoten) mit der "normalen" cross correlation und verschiedenen time-lags (0, 1, 7, 14 Tage). Also in etwa so:
*
#!python
# lag 1:
# initialize matrix
A_1 = numpy.zeros((1872, 1872))
for i in range(1872):
for j in range(1872):
CC = core.Data.calculate_cross_correlation(summer_anomaly[:, i], summer_anomaly[:, j], max_delay=15, gamma=0, normed=False)
# 0.5 ist der threshold
if numpy.fabs(CC[15]) >= 0.5:
A_1[i, j] = 1
else:
A_1[i, j] = 0
net_lag1 = core.Network(A_1)
degree_lag1 = net_lag1.get_degree()
*Für größere lags kriege ich allerdings die Fehlermeldung bei Aufruf von get_degree():
File "/iplex/01/sys/applications/pik-python/lib/python2.7/site-packages/pyunicorn/core/network.py", line 1738, in get_degree
k = self.get_outdegree()
File "/iplex/01/sys/applications/pik-python/lib/python2.7/site-packages/pyunicorn/core/network.py", line 1778, in get_outdegree
spmatrix.matrixmultiply(self.sparse_A, self._sp_ones)).
File "/iplex/01/sys/applications/pik-python/lib/python2.7/site-packages/pyunicorn/core/network.py", line 1796, in _sparse_to_column
v.put(np.array(self._get_sparse_keys(matrix))[:, 0], matrix.values())
IndexError: too many indices
Ich vermute, dass es daran liegt, dass die Adjacency Matrix dann keine Einträge ungleich Null hat? Zumindest klappt es wenn ich den threshold auf 0.1 runter setze.*
Original comment by: Jonathan Donges
Original comment on: 2014-09-24
from pyunicorn.
Should be resolved by the still experimental code ported to scipy.sparse
. @jdonges: minimal reproducible case for testing?
Original comment by: ntfrgl
Original comment on: 2014-09-24
from pyunicorn.
Here is a minimal example:
#!python
from pyunicorn import Network
g = Network(np.zeros((2,2)))
g.get_degree()
Original comment by: Jonathan Donges
Original comment on: 2014-09-25
from pyunicorn.
Commit 5a6b858 seems to do the job.
Original comment by: ntfrgl
Original comment on: 2014-10-01
from pyunicorn.
Related Issues (20)
- LINT: few remaining refactor and warning flags to be resolved HOT 2
- Tests failing with `Unable to lock file`
- pip install pyunicorn error:error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2 HOT 1
- LINT: disabled `pylint` flags should be re-enabled where possible, or disabled locally HOT 5
- Replace: `progressbar` -> `tqdm`
- MAINT: add `cython-lint` to test suite
- MAINT: review funcionality and use of `CouplingAnalysis.get_nearest_neighbors()` and add a specific test
- ENH: Theiler window option for diagonal RQA measures in `RecurrencePlot` HOT 2
- CI: set up Travis CI for macOS and Windows builds
- MAINT: drop `climate.MapPlots` in favour of `climate.CartopyPlots` HOT 2
- ENH: Remove old examples folder
- `Network.nsi_local_clustering()` might encounter divide by zero when `typical_weight` is given HOT 1
- module 'numpy' has no attribute 'int' HOT 1
- Failed building wheel for pyunicorn while installing HOT 4
- Printing `ClimateData` object throws `KeyError` from `h5netcdf` HOT 2
- Add `typical_weight` argument for all n.s.i. measures to enable their "corrected" versions
- numpy module not found during installation (Win10) HOT 1
- DOC: sphinx `Didn't find <class attribute> in <module>` when building docs HOT 2
- ModuleNotFoundError from pip install (version 0.6.1) HOT 2
- Complete implementation of new caching system, and extend
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyunicorn.