Re: Is it possible to flatten hash table?
- To: mathgroup at smc.vnet.net
- Subject: [mg124159] Re: Is it possible to flatten hash table?
- From: Szymon Roziewski <szymon.roziewski at gmail.com>
- Date: Wed, 11 Jan 2012 04:25:06 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <CAMxxcfZBwFJDRkvqgZmxYYTN84R0dEV1W_zqA1BK70fXE+M=3g@mail.gmail.com>
When I do that code Arr={{-2.96667, -2., -1.80139}, {-2.93333, -2., -0.162703}, {-2.96667, \ -1.96667, -3.31212}, {-2.93333, -1.96667, -5.34749}} MakeLoopHash[Arr_] := Module[{Res, dimt, i, dim, tmp}, dimt = Dimensions[Arr, 1]; dim = dimt[[1]]; Res = {}; Do[ tmp = ToString[Arr[[i, 1]]]; Res[tmp] = 1; , {i, 1, dim}]; Res ]; I get Set::write: Tag List in {}[-2.96667] is Protected. >> It annoys me because if I am doing it with my fingers not loop I have a good result.