Bug introduced in 10.0.0 and fixed in 10.1.0.
Has anyone had problems with the DeleteMissing
function in Mathematica 10.0.2? I find that it rarely works. Most of the time it returns a list which still contains all of the missing elements. For example, let's say a = {Missing[], 1, 2, 3}
then DeleteMissing[a]
returns {Missing[] , 1, 2, 3}
.
Answer
I can reproduce this problem only if the Suggestions Bar is enabled. In this case DeleteMissing
seems to mysteriously lose its definition.
In[1]:= {$Version, $VersionNumber, $ReleaseNumber}
Out[1]= {"10.0 for Mac OS X x86 (64-bit) (December 4, 2014)", 10., 2}
In[2]:= a = {Missing[], 1, 2, 3}
Out[2]= {Missing[], 1, 2, 3}
In[3]:= DeleteMissing[a]
Out[3]= DeleteMissing[{Missing[], 1, 2, 3}]
In[4]:= Definition@DeleteMissing
Out[4]= Definition[DeleteMissing]
This looks to be the exact same issue from here:
Please report it to Wolfram Support.
As a workaround, you can turn off the Suggestions Bar by going to Preferences -> Interface and unchecking Show Suggestions Bar After Last Output. After turning off the Suggestions Bar, it is also necessary to Quit
and relaunch the kernel for the problem to go away.
Comments
Post a Comment