New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolution_conflict warning too long with array values. #874

Closed
thesamovar opened this Issue Aug 30, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@thesamovar
Member

thesamovar commented Aug 30, 2017

I regularly get stuff like this:

WARNING    "t" is an internal variable of group "synapses", but also exists in the run namespace with the value array([  1.1       ,   1.10890891,   1.11781782,   1.12672673,
         1.13563564,   1.14454454,   1.15345345,   1.16236236,
         1.17127127,   1.18018018,   1.18908909,   1.197998  ,
         1.20690691,   1.21581582,   1.22472472,   1.23363363,
         1.24254254,   1.25145145,   1.26036036,   1.26926927,
         1.27817818,   1.28708709,   1.295996  ,   1.3049049 ,
         1.31381381,   1.32272272,   1.33163163,   1.34054054,
         1.34944945,   1.35835836,   1.36726727,   1.37617618,
         1.38508509,   1.39399399,   1.4029029 ,   1.41181181,
         1.42072072,   1.42962963,   1.43853854,   1.44744745,
         1.45635636,   1.46526527,   1.47417417,   1.48308308,
         1.49199199,   1.5009009 ,   1.50980981,   1.51871872,
         1.52762763,   1.53653654,   1.54544545,   1.55435435,
         1.56326326,   1.57217217,   1.58108108,   1.58998999,
         1.5988989 ,   1.60780781,   1.61671672,   1.62562563,
         1.63453453,   1.64344344,   1.65235235,   1.66126126,
         1.67017017,   1.67907908,   1.68798799,   1.6968969 ,
         1.70580581,   1.71471471,   1.72362362,   1.73253253,
         1.74144144,   1.75035035,   1.75925926,   1.76816817,
         1.77707708,   1.78598599,   1.79489489,   1.8038038 ,
         1.81271271,   1.82162162,   1.83053053,   1.83943944,
         1.84834835,   1.85725726,   1.86616617,   1.87507508,
         1.88398398,   1.89289289,   1.9018018 ,   1.91071071,
         1.91961962,   1.92852853,   1.93743744,   1.94634635,
         1.95525526,   1.96416416,   1.97307307,   1.98198198,
         1.99089089,   1.9997998 ,   2.00870871,   2.01761762,
         2.02652653,   2.03543544,   2.04434434,   2.05325325,
         2.06216216,   2.07107107,   2.07997998,   2.08888889,
         2.0977978 ,   2.10670671,   2.11561562,   2.12452452,
         2.13343343,   2.14234234,   2.15125125,   2.16016016,
         2.16906907,   2.17797798,   2.18688689,   2.1957958 ,
         2.2047047 ,   2.21361361,   2.22252252,   2.23143143,
         2.24034034,   2.24924925,   2.25815816,   2.26706707,
         2.27597598,   2.28488488,   2.29379379,   2.3027027 ,
         2.31161161,   2.32052052,   2.32942943,   2.33833834,
         2.34724725,   2.35615616,   2.36506507,   2.37397397,
         2.38288288,   2.39179179,   2.4007007 ,   2.40960961,
         2.41851852,   2.42742743,   2.43633634,   2.44524525,
         2.45415415,   2.46306306,   2.47197197,   2.48088088,
         2.48978979,   2.4986987 ,   2.50760761,   2.51651652,
         2.52542543,   2.53433433,   2.54324324,   2.55215215,
         2.56106106,   2.56996997,   2.57887888,   2.58778779,
         2.5966967 ,   2.60560561,   2.61451451,   2.62342342,
         2.63233233,   2.64124124,   2.65015015,   2.65905906,
         2.66796797,   2.67687688,   2.68578579,   2.69469469,
         2.7036036 ,   2.71251251,   2.72142142,   2.73033033,
         2.73923924,   2.74814815,   2.75705706,   2.76596597,
         2.77487487,   2.78378378,   2.79269269,   2.8016016 ,
         2.81051051,   2.81941942,   2.82832833,   2.83723724,
         2.84614615,   2.85505506,   2.86396396,   2.87287287,
         2.88178178,   2.89069069,   2.8995996 ,   2.90850851,
         2.91741742,   2.92632633,   2.93523524,   2.94414414,
         2.95305305,   2.96196196,   2.97087087,   2.97977978,
         2.98868869,   2.9975976 ,   3.00650651,   3.01541542,
         3.02432432,   3.03323323,   3.04214214,   3.05105105,
         3.05995996,   3.06886887,   3.07777778,   3.08668669,
         3.0955956 ,   3.1045045 ,   3.11341341,   3.12232232,
         3.13123123,   3.14014014,   3.14904905,   3.15795796,
         3.16686687,   3.17577578,   3.18468468,   3.19359359,
         3.2025025 ,   3.21141141,   3.22032032,   3.22922923,
         3.23813814,   3.24704705,   3.25595596,   3.26486486,
         3.27377377,   3.28268268,   3.29159159,   3.3005005 ,
         3.30940941,   3.31831832,   3.32722723,   3.33613614,
         3.34504505,   3.35395395,   3.36286286,   3.37177177,
         3.38068068,   3.38958959,   3.3984985 ,   3.40740741,
         3.41631632,   3.42522523,   3.43413413,   3.44304304,
         3.45195195,   3.46086086,   3.46976977,   3.47867868,
         3.48758759,   3.4964965 ,   3.50540541,   3.51431431,
         3.52322322,   3.53213213,   3.54104104,   3.54994995,
         3.55885886,   3.56776777,   3.57667668,   3.58558559,
         3.59449449,   3.6034034 ,   3.61231231,   3.62122122,
         3.63013013,   3.63903904,   3.64794795,   3.65685686,
         3.66576577,   3.67467467,   3.68358358,   3.69249249,
         3.7014014 ,   3.71031031,   3.71921922,   3.72812813,
         3.73703704,   3.74594595,   3.75485485,   3.76376376,
         3.77267267,   3.78158158,   3.79049049,   3.7993994 ,
         3.80830831,   3.81721722,   3.82612613,   3.83503504,
         3.84394394,   3.85285285,   3.86176176,   3.87067067,
         3.87957958,   3.88848849,   3.8973974 ,   3.90630631,
         3.91521522,   3.92412412,   3.93303303,   3.94194194,
         3.95085085,   3.95975976,   3.96866867,   3.97757758,
         3.98648649,   3.9953954 ,   4.0043043 ,   4.01321321,
         4.02212212,   4.03103103,   4.03993994,   4.04884885,
         4.05775776,   4.06666667,   4.07557558,   4.08448448,
         4.09339339,   4.1023023 ,   4.11121121,   4.12012012,
         4.12902903,   4.13793794,   4.14684685,   4.15575576,
         4.16466466,   4.17357357,   4.18248248,   4.19139139,
         4.2003003 ,   4.20920921,   4.21811812,   4.22702703,
         4.23593594,   4.24484484,   4.25375375,   4.26266266,
         4.27157157,   4.28048048,   4.28938939,   4.2982983 ,
         4.30720721,   4.31611612,   4.32502503,   4.33393393,
         4.34284284,   4.35175175,   4.36066066,   4.36956957,
         4.37847848,   4.38738739,   4.3962963 ,   4.40520521,
         4.41411411,   4.42302302,   4.43193193,   4.44084084,
         4.44974975,   4.45865866,   4.46756757,   4.47647648,
         4.48538539,   4.49429429,   4.5032032 ,   4.51211211,
         4.52102102,   4.52992993,   4.53883884,   4.54774775,
         4.55665666,   4.56556557,   4.57447447,   4.58338338,
         4.59229229,   4.6012012 ,   4.61011011,   4.61901902,
         4.62792793,   4.63683684,   4.64574575,   4.65465465,
         4.66356356,   4.67247247,   4.68138138,   4.69029029,
         4.6991992 ,   4.70810811,   4.71701702,   4.72592593,
         4.73483483,   4.74374374,   4.75265265,   4.76156156,
         4.77047047,   4.77937938,   4.78828829,   4.7971972 ,
         4.80610611,   4.81501502,   4.82392392,   4.83283283,
         4.84174174,   4.85065065,   4.85955956,   4.86846847,
         4.87737738,   4.88628629,   4.8951952 ,   4.9041041 ,
         4.91301301,   4.92192192,   4.93083083,   4.93973974,
         4.94864865,   4.95755756,   4.96646647,   4.97537538,
         4.98428428,   4.99319319,   5.0021021 ,   5.01101101,
         5.01991992,   5.02882883,   5.03773774,   5.04664665,
         5.05555556,   5.06446446,   5.07337337,   5.08228228,
         5.09119119,   5.1001001 ,   5.10900901,   5.11791792,
         5.12682683,   5.13573574,   5.14464464,   5.15355355,
         5.16246246,   5.17137137,   5.18028028,   5.18918919,
         5.1980981 ,   5.20700701,   5.21591592,   5.22482482,
         5.23373373,   5.24264264,   5.25155155,   5.26046046,
         5.26936937,   5.27827828,   5.28718719,   5.2960961 ,
         5.30500501,   5.31391391,   5.32282282,   5.33173173,
         5.34064064,   5.34954955,   5.35845846,   5.36736737,
         5.37627628,   5.38518519,   5.39409409,   5.403003  ,
         5.41191191,   5.42082082,   5.42972973,   5.43863864,
         5.44754755,   5.45645646,   5.46536537,   5.47427427,
         5.48318318,   5.49209209,   5.501001  ,   5.50990991,
         5.51881882,   5.52772773,   5.53663664,   5.54554555,
         5.55445445,   5.56336336,   5.57227227,   5.58118118,
         5.59009009,   5.598999  ,   5.60790791,   5.61681682,
         5.62572573,   5.63463463,   5.64354354,   5.65245245,
         5.66136136,   5.67027027,   5.67917918,   5.68808809,
         5.696997  ,   5.70590591,   5.71481481,   5.72372372,
         5.73263263,   5.74154154,   5.75045045,   5.75935936,
         5.76826827,   5.77717718,   5.78608609,   5.79499499,
         5.8039039 ,   5.81281281,   5.82172172,   5.83063063,
         5.83953954,   5.84844845,   5.85735736,   5.86626627,
         5.87517518,   5.88408408,   5.89299299,   5.9019019 ,
         5.91081081,   5.91971972,   5.92862863,   5.93753754,
         5.94644645,   5.95535536,   5.96426426,   5.97317317,
         5.98208208,   5.99099099,   5.9998999 ,   6.00880881,
         6.01771772,   6.02662663,   6.03553554,   6.04444444,
         6.05335335,   6.06226226,   6.07117117,   6.08008008,
         6.08898899,   6.0978979 ,   6.10680681,   6.11571572,
         6.12462462,   6.13353353,   6.14244244,   6.15135135,
         6.16026026,   6.16916917,   6.17807808,   6.18698699,
         6.1958959 ,   6.2048048 ,   6.21371371,   6.22262262,
         6.23153153,   6.24044044,   6.24934935,   6.25825826,
         6.26716717,   6.27607608,   6.28498498,   6.29389389,
         6.3028028 ,   6.31171171,   6.32062062,   6.32952953,
         6.33843844,   6.34734735,   6.35625626,   6.36516517,
         6.37407407,   6.38298298,   6.39189189,   6.4008008 ,
         6.40970971,   6.41861862,   6.42752753,   6.43643644,
         6.44534535,   6.45425425,   6.46316316,   6.47207207,
         6.48098098,   6.48988989,   6.4987988 ,   6.50770771,
         6.51661662,   6.52552553,   6.53443443,   6.54334334,
         6.55225225,   6.56116116,   6.57007007,   6.57897898,
         6.58788789,   6.5967968 ,   6.60570571,   6.61461461,
         6.62352352,   6.63243243,   6.64134134,   6.65025025,
         6.65915916,   6.66806807,   6.67697698,   6.68588589,
         6.69479479,   6.7037037 ,   6.71261261,   6.72152152,
         6.73043043,   6.73933934,   6.74824825,   6.75715716,
         6.76606607,   6.77497497,   6.78388388,   6.79279279,
         6.8017017 ,   6.81061061,   6.81951952,   6.82842843,
         6.83733734,   6.84624625,   6.85515516,   6.86406406,
         6.87297297,   6.88188188,   6.89079079,   6.8996997 ,
         6.90860861,   6.91751752,   6.92642643,   6.93533534,
         6.94424424,   6.95315315,   6.96206206,   6.97097097,
         6.97987988,   6.98878879,   6.9976977 ,   7.00660661,
         7.01551552,   7.02442442,   7.03333333,   7.04224224,
         7.05115115,   7.06006006,   7.06896897,   7.07787788,
         7.08678679,   7.0956957 ,   7.1046046 ,   7.11351351,
         7.12242242,   7.13133133,   7.14024024,   7.14914915,
         7.15805806,   7.16696697,   7.17587588,   7.18478478,
         7.19369369,   7.2026026 ,   7.21151151,   7.22042042,
         7.22932933,   7.23823824,   7.24714715,   7.25605606,
         7.26496496,   7.27387387,   7.28278278,   7.29169169,
         7.3006006 ,   7.30950951,   7.31841842,   7.32732733,
         7.33623624,   7.34514515,   7.35405405,   7.36296296,
         7.37187187,   7.38078078,   7.38968969,   7.3985986 ,
         7.40750751,   7.41641642,   7.42532533,   7.43423423,
         7.44314314,   7.45205205,   7.46096096,   7.46986987,
         7.47877878,   7.48768769,   7.4965966 ,   7.50550551,
         7.51441441,   7.52332332,   7.53223223,   7.54114114,
         7.55005005,   7.55895896,   7.56786787,   7.57677678,
         7.58568569,   7.59459459,   7.6035035 ,   7.61241241,
         7.62132132,   7.63023023,   7.63913914,   7.64804805,
         7.65695696,   7.66586587,   7.67477477,   7.68368368,
         7.69259259,   7.7015015 ,   7.71041041,   7.71931932,
         7.72822823,   7.73713714,   7.74604605,   7.75495495,
         7.76386386,   7.77277277,   7.78168168,   7.79059059,
         7.7994995 ,   7.80840841,   7.81731732,   7.82622623,
         7.83513514,   7.84404404,   7.85295295,   7.86186186,
         7.87077077,   7.87967968,   7.88858859,   7.8974975 ,
         7.90640641,   7.91531532,   7.92422422,   7.93313313,
         7.94204204,   7.95095095,   7.95985986,   7.96876877,
         7.97767768,   7.98658659,   7.9954955 ,   8.0044044 ,
         8.01331331,   8.02222222,   8.03113113,   8.04004004,
         8.04894895,   8.05785786,   8.06676677,   8.07567568,
         8.08458458,   8.09349349,   8.1024024 ,   8.11131131,
         8.12022022,   8.12912913,   8.13803804,   8.14694695,
         8.15585586,   8.16476476,   8.17367367,   8.18258258,
         8.19149149,   8.2004004 ,   8.20930931,   8.21821822,
         8.22712713,   8.23603604,   8.24494494,   8.25385385,
         8.26276276,   8.27167167,   8.28058058,   8.28948949,
         8.2983984 ,   8.30730731,   8.31621622,   8.32512513,
         8.33403403,   8.34294294,   8.35185185,   8.36076076,
         8.36966967,   8.37857858,   8.38748749,   8.3963964 ,
         8.40530531,   8.41421421,   8.42312312,   8.43203203,
         8.44094094,   8.44984985,   8.45875876,   8.46766767,
         8.47657658,   8.48548549,   8.49439439,   8.5033033 ,
         8.51221221,   8.52112112,   8.53003003,   8.53893894,
         8.54784785,   8.55675676,   8.56566567,   8.57457457,
         8.58348348,   8.59239239,   8.6013013 ,   8.61021021,
         8.61911912,   8.62802803,   8.63693694,   8.64584585,
         8.65475475,   8.66366366,   8.67257257,   8.68148148,
         8.69039039,   8.6992993 ,   8.70820821,   8.71711712,
         8.72602603,   8.73493493,   8.74384384,   8.75275275,
         8.76166166,   8.77057057,   8.77947948,   8.78838839,
         8.7972973 ,   8.80620621,   8.81511512,   8.82402402,
         8.83293293,   8.84184184,   8.85075075,   8.85965966,
         8.86856857,   8.87747748,   8.88638639,   8.8952953 ,
         8.9042042 ,   8.91311311,   8.92202202,   8.93093093,
         8.93983984,   8.94874875,   8.95765766,   8.96656657,
         8.97547548,   8.98438438,   8.99329329,   9.0022022 ,
         9.01111111,   9.02002002,   9.02892893,   9.03783784,
         9.04674675,   9.05565566,   9.06456456,   9.07347347,
         9.08238238,   9.09129129,   9.1002002 ,   9.10910911,
         9.11801802,   9.12692693,   9.13583584,   9.14474474,
         9.15365365,   9.16256256,   9.17147147,   9.18038038,
         9.18928929,   9.1981982 ,   9.20710711,   9.21601602,
         9.22492492,   9.23383383,   9.24274274,   9.25165165,
         9.26056056,   9.26946947,   9.27837838,   9.28728729,
         9.2961962 ,   9.30510511,   9.31401401,   9.32292292,
         9.33183183,   9.34074074,   9.34964965,   9.35855856,
         9.36746747,   9.37637638,   9.38528529,   9.39419419,
         9.4031031 ,   9.41201201,   9.42092092,   9.42982983,
         9.43873874,   9.44764765,   9.45655656,   9.46546547,
         9.47437437,   9.48328328,   9.49219219,   9.5011011 ,
         9.51001001,   9.51891892,   9.52782783,   9.53673674,
         9.54564565,   9.55455455,   9.56346346,   9.57237237,
         9.58128128,   9.59019019,   9.5990991 ,   9.60800801,
         9.61691692,   9.62582583,   9.63473473,   9.64364364,
         9.65255255,   9.66146146,   9.67037037,   9.67927928,
         9.68818819,   9.6970971 ,   9.70600601,   9.71491491,
         9.72382382,   9.73273273,   9.74164164,   9.75055055,
         9.75945946,   9.76836837,   9.77727728,   9.78618619,
         9.7950951 ,   9.804004  ,   9.81291291,   9.82182182,
         9.83073073,   9.83963964,   9.84854855,   9.85745746,
         9.86636637,   9.87527528,   9.88418418,   9.89309309,
         9.902002  ,   9.91091091,   9.91981982,   9.92872873,
         9.93763764,   9.94654655,   9.95545546,   9.96436436,
         9.97327327,   9.98218218,   9.99109109,  10.        ]). The internal variable will be used. [brian2.groups.group.Group.resolve.resolution_conflict]

Very annoying and not helpful to show all the values. We should either replace this with a specific message for arrays, or have a general mechanism that caps the repr or str output at a fixed number of characters (say 40 characters). I'd go for the latter - preferences on that?

@mstimberg

This comment has been minimized.

Show comment
Hide comment
@mstimberg

mstimberg Aug 30, 2017

Member

Indeed, that doesn't make any sense. That the warning states the value was meant for scalar constants, not for arrays (in a way, the warning does not make any sense for arrays anyway, as we don't take them from the namespace regardless of whether they clash with an internal variable or not).

Member

mstimberg commented Aug 30, 2017

Indeed, that doesn't make any sense. That the warning states the value was meant for scalar constants, not for arrays (in a way, the warning does not make any sense for arrays anyway, as we don't take them from the namespace regardless of whether they clash with an internal variable or not).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment