In the front end of Mathematica version 10, a new feature was implemented which dims output cells that no longer correspond to its input cells. So when you type

1 + 1
(* 2 *)

and go into the input and add another +1, the 2 is slightly gray to indicate that 1+1+1 is not 2. SparseArray seem to be always grey, as if they are never up-to-date

Mathematica graphics

The same is true for InterpolatingFunction but not for CompiledFunction.

Mathematica graphics

Any clues why this is?

  • $\begingroup$ @RunnyKine I didn't know so I tagged it. I have removed the Linux tag now. $\endgroup$ – halirutan Jul 17 '14 at 4:49
  • $\begingroup$ I'm on OSX 10.9.4 and my result cell is a little grey when the output is first produced, but then goes even more grey when the input cell is edited. It's never black $\endgroup$ – Cameron Murray Jul 17 '14 at 4:51
  • $\begingroup$ Same on Linux, it isn't as grayed as when you edit $\endgroup$ – Rojo Jul 17 '14 at 4:51
  • $\begingroup$ I get the same behavior as @CameronMurray on Windows 8.1. The behavior is still as expected, it's just a different shade of gray. $\endgroup$ – RunnyKine Jul 17 '14 at 4:54
  • 2
    $\begingroup$ I think the intermediate gray form is warn users that they can't copy and paste the output into another input cell and expect it to be interpreted properly when the input cell is evaluated $\endgroup$ – m_goldberg Jul 17 '14 at 8:50

This is not related to the output cell greying to indicate mismatch with the input cell. You can easily verify this by editing the input cell — it gets further greyed out.

The new summarized display that is used for things like SparseArray, Interpolation, etc. has a setting "Interpretable" -> False. If this is the case, the output is showed in a gray font. On the other hand, the summarized outputs that have "Interpretable" -> True are shown in black.

You can check the above conclusion with the following example:

foo /: MakeBoxes[foo, StandardForm] := 
 BoxForm`ArrangeSummaryBox[foo, Null, 
  Null, {BoxForm`MakeSummaryItem[{"Message: ", "Hello"}, 
    StandardForm]}, {"World"}, StandardForm, "Interpretable" -> False];

  • 1
    $\begingroup$ So that CompiledFunction is a black beauty is only a bug, because the output cannot be edited as it is the case for SparseArray? $\endgroup$ – halirutan Jul 17 '14 at 5:01
  • $\begingroup$ @halirutan I think the functionality for the "Interpretable" option is not fully fleshed out... the default value is True, so it could just be the case that people forgot to set it to False. $\endgroup$ – rm -rf Jul 17 '14 at 5:03
  • $\begingroup$ Actually, no. The functionality works fine. It just appears that it is not applied correctly to some functions. $\endgroup$ – rm -rf Jul 17 '14 at 5:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.