diff --git a/ForScience/PacletInfo.m b/ForScience/PacletInfo.m index 7f31d89..8c03bb0 100644 --- a/ForScience/PacletInfo.m +++ b/ForScience/PacletInfo.m @@ -4,7 +4,7 @@ Name -> "ForScience", Description -> "Contains various utility functions and styling to make it easier to use MMA for scientific plots", Creator -> "Lukas Lang & Marc Lehner", - Version -> "0.38.2", + Version -> "0.38.3", MathematicaVersion -> "11.1+", Extensions -> { { "Documentation", Language -> "English"}, diff --git a/ForScience/Util.wl b/ForScience/Util.wl index 735ae49..cbf5c34 100644 --- a/ForScience/Util.wl +++ b/ForScience/Util.wl @@ -545,10 +545,10 @@ Attributes[iProgressReport]={HoldFirst}; Options[iProgressReport]=Options[ProgressReport]; Attributes[ProgressReportTransform]={HoldFirst}; -ProgressReportTransform[(m:Map|ParallelMap|AssociationMap|MapIndexed)[func_,list_],o:OptionsPattern[ProgressReport]]:= -With[{elist=list},ProgressReportTransform[m[func,elist],Evaluated,o]] -ProgressReportTransform[(m:Map|ParallelMap|AssociationMap|MapIndexed)[func_,list_],Evaluated,o:OptionsPattern[ProgressReport]]:= -ProgressReport[m[Step@*func@*SetCurrentBy[],list],Length@list,o,"Parallel"->m===ParallelMap] +ProgressReportTransform[(m:Map|ParallelMap|AssociationMap|MapIndexed)[func_,list_,level_:{1}],o:OptionsPattern[ProgressReport]]:= +With[{elist=list},ProgressReportTransform[m[func,elist,level],Evaluated,o]] +ProgressReportTransform[(m:Map|ParallelMap|AssociationMap|MapIndexed)[func_,list_,level_],Evaluated,o:OptionsPattern[ProgressReport]]:= +ProgressReport[m[Step@*func@*SetCurrentBy[],list,level],Length@Level[list,level],o,"Parallel"->m===ParallelMap] ProgressReportTransform[(m:Map|ParallelMap|MapIndexed)[func_,ass_Association],Evaluated,o:OptionsPattern[ProgressReport]]:=With[ {argProc=If[m===MapIndexed,##&,#&]}, ProgressReport[If[m===ParallelMap,Parallelize,#]&@@Hold@MapIndexed[Step@*func@*argProc@*SetCurrentBy[#&@@First@#2&],ass],Length@ass,o,"Parallel"->m===ParallelMap]