Tag Info

New answers tagged

5

This is a known issue. It is not about package loading (or Nearest) but about Catch/Throw not working correctly when used during kernel initialization. For example, just putting the following in init.m Catch[Throw[1]] will result in similar behavior. The workaround I've been using is to run any init code depending on Catch/Throw as a scheduled task, e.g. ...


2

Try clearing the variables first, for example: Clear[a, b, x, y]; The result in the question can be reproduced exactly by evaluating a = (x + y)^20 // Expand; Solve[x^2 + a x + b == 0, x] and the package example notebook ToMatlabExamples.nb does contain such an assignment to a -- most likely it has been evaluated in the same kernel session before ...


5

AA and BB in the definition of f are local symbols of the Test1`context. If you want to use them in the Global context you have to export them from the package or you have to precede them with their context: f[Test1`Private`AA[3]] 1 Or BeginPackage["Test1`"]; ClearAll[f]; f::usage = ""; AA::usage = ""; BB::usage = ""; Begin["`Private`"]; f[x_AA] := ...


11

I am not really familiar with LISP macros but from what little I think I know these do not appear to be strongly related. Rather they appear to be utility functions for function authors; it seems that a number of recently added internal top-level definitions use them. Some of them clearly do use meta-programming type expansions so perhaps they are closer ...


1

This question has been solved with the help from comments above. In fact, I have to say,I don't really think how to use this function when I begin to edit.In the process of discussing with others, I think there are two ways to solve this problem. If I really want a symbolic output, I must define or declare X and Y at the beginning of the Private part.But I ...


15

In addition to the error messages quoted in the question the line returns: GeneralUtilities`Benchmarking`PackagePrivate`plot[ IndexBy[{{{16, 9.37132*10^-6}, . . . IndexBy was removed from 10.1.0: Note that IndexBy will be removed in a future version of Mathematica. It was something that was considered for 10.0.0 but didn't make the cut. – Stefan R ...


2

It is a matter of having the right $ContextPath at the time n is referenced. This is slightly complicated by the fact that contexts are interpreted at parse time, so typical tricks such as Block do not work. The behavior of Begin and BeginPackage are also different with respect to $ContextPath, but this is all discussed in the documentation, so I will let ...



Top 50 recent answers are included