Linked Questions

43
votes
5answers
1k views

Why is there no PositionFunction in Mathematica?

Too often I have seen the programs of inexperienced users greatly slowed by using Position in an iterative fashion, when far faster would have been to compute a ...
35
votes
3answers
1k views

DeleteDuplicatesBy is not performing as I'd hoped. Am I missing something?

Déjà vu: a new-in-v10 function should provide a better solution to an old problem, but my enthusiasm is curbed when I run timings. This time the function is ...
46
votes
2answers
1k views

Why is the new PositionIndex horribly slow?

This issue has largely been mitigated in 10.0.1. New timings for the final test below are: ...
34
votes
2answers
731 views

GroupBy twice gives different results

Bug introduced in 7.0 or earlier and persisting through 11.1 It took me quite a lot of time to finally trace down to this strange output. I really don't know why. First, I create a list ...
18
votes
2answers
309 views

Association's Attributes change between 10.3.1 & 10.4?

In Mathematica 10.3.1 In[1]:= Attributes[Association] Out[1]= {Protected} In Mathematica 10.4: ...
16
votes
1answer
271 views

Pattern matching to a function evaluation inside an Association

I find the following behaviour deeply counter-intuitive: <|1 -> 123.456 |> /. {x_?NumericQ -> Round[x]} (* <|1 -> Round[123.456]|> *) That ...
14
votes
1answer
225 views

Fractional Keys in Associations

I got into an unfortunate situation, involving fractions that can get changed by evaluation, which occur as (part of) keys in my associations. I will probably steer far away from the entire situation, ...
9
votes
3answers
320 views

How does MapThread work with Associations

According to the documentation, MapThread works on Association objects. But it doesn't seem to evaluate the passed function. For ...
7
votes
2answers
186 views

Query/Part Bug with :>

Bug observed in 10.0.1 and persisting through to 10.4.0 Part can fail with :> ...
7
votes
1answer
156 views

Problem Using Evaluated Replace with Associations

If I define some function like: toISOdate[data_List]:=DateString[data,{"Year","-","Month","-","Day"}] and try to applicate it in an ...
4
votes
1answer
79 views

How to make Association reflect new assignments

How do I get Association to act like List in the following? ...
16
votes
0answers
183 views

Why are delayed definitions in scoping functions NOT documented?

As outlined here, := may be used in scoping constructs like With to give delayed definitions, but this is undocumented. This ...