指定将被存储在显示出来的摘要框内的表达式、数据集及其他紧凑输出的最大字节数.
$NotebookInlineStorageLimit
指定将被存储在显示出来的摘要框内的表达式、数据集及其他紧凑输出的最大字节数.
更多信息
- 如 SparseArray、TimeSeries 和 InterpolatingFunction 等函数使用摘要框显示函数的名称、图标和关键属性,而不是完整的表达式.
- 对于小于 $NotebookInlineStorageLimit 的表达式,摘要框含有完整的表达式,可重新用作输入.
- 对于大于 $NotebookInlineStorageLimit 的表达式,摘要框中没有包含完整的表达式,但提供了用于存储表达式的接口,以后可以使用.
- 只能在创建它的内核会话仍在运行,并且在变量或 Out[n] 中引用该表达式的情况下才能将表达式嵌入到笔记本中.
- 为了与版本 12.1 之前的 Wolfram 语言版本兼容,还可以使用 $SummaryBoxDataSizeLimit 访问 $NotebookInlineStorageLimit 的值.
范例
打开所有单元 关闭所有单元基本范例 (2)
$NotebookInlineStorageLimitByteCount[SparseArray[{1, 2, 3, 4, 5}]] < $NotebookInlineStorageLimitSparseArray[{1, 2, 3, 4, 5}]Total[SparseArray[Automatic, {5}, 0, {1, {{0, 5}, {{1}, {2}, {3}, {4}, {5}}}, {1, 2, 3, 4, 5}}]]将 $NotebookInlineStorageLimit 设为较小的值:
$NotebookInlineStorageLimit = 100;ByteCount[SparseArray[{1, 2, 3, 4, 5}]] < $NotebookInlineStorageLimit因此,摘要框没有保存完整的表达式,但提供了一个接口来存储表达式:
SparseArray[{1, 2, 3, 4, 5}]Total[SparseArray[<5>, {5}]]Total[SparseArray[Automatic, {5}, 0, {1, {{0, 5}, {{1}, {2}, {3}, {4}, {5}}}, {1, 2, 3, 4, 5}}]]恢复 $NotebookInlineStorageLimit 的默认值:
$NotebookInlineStorageLimit = 2 ^ 20范围 (5)
Dataset 遵守 $NotebookInlineStorageLimit:
{Dataset[RandomInteger[1, {5, 2}]], Dataset[RandomInteger[1, {20000, 8}], MaxItems -> 5]}ByteCount /@ %如 InterpolatingFunction 这样的数值函数遵守 $NotebookInlineStorageLimit:
{Interpolation[Range[10 ^ 2]], Interpolation[Range[10 ^ 5]]}ByteCount /@ %NearestFunction 亦是如此:
{Nearest[RandomReal[10, {1000, 3}]], Nearest[Flatten@ImagePartition[[image], 6]]}ByteCount /@ %产生摘要框的数组类型也遵守 $NotebookInlineStorageLimit:
{SparseArray[Range[10 ^ 5]], SparseArray[RandomVariate[BinomialDistribution[1, 0.05], {10 ^ 5}]]}ByteCount /@ %{SymmetrizedArray[{{0, 5, 10}, {-5, 0, -7}, {-10, 7, 0}}], SymmetrizedArray[IdentityMatrix[10 ^ 4, SparseArray]]}ByteCount /@ %如 TimeSeries 这样的统计函数遵守 $NotebookInlineStorageLimit:
{TimeSeries[RandomFunction[WienerProcess[], {0., 15, 0.0001}]], ExampleData[{"Statistics", "AirlinePassengerMiles"}, "TimeSeries"]}ByteCount /@ %WeightedData 亦是如此:
{WeightedData[{{1, 2}, {4, 5}, {5, 6}, {7, 3}}, {0.5, 0.25, 0.1, 1}], WeightedData[#, # ^ 2]&[RandomVariate[NormalDistribution[0, 1], 10 ^ 5]]}ByteCount /@ %GeoPosition 遵守 $NotebookInlineStorageLimit:
{GeoPosition[RandomReal[{-90, 90}, {100, 2}]], GeoPosition[RandomReal[{-90, 90}, {100000, 2}]]}ByteCount /@ %应用 (2)
将 $NotebookInlineStorageLimit 设为零以节省笔记本中的空间:
$NotebookInlineStorageLimit = 0创建一个不包含表达式的摘要框,并将对单元的引用保存在 c1 中:
DynamicWrapper[if = Interpolation[RandomReal[10, 500]], c1 = EvaluationCell[]]恢复 $NotebookInlineStorageLimit 的默认值:
$NotebookInlineStorageLimit = 2 ^ 20重建 if 的摘要框,现在其中含有表达式 并将对单元的引用保存在 c2 中:
DynamicWrapper[if, c2 = EvaluationCell[]]ByteCount[NotebookRead[c2]] - ByteCount[NotebookRead[c1]]在内核会话中,通过将 $HistoryLength 设为零来节省内存:
$HistoryLength = 0;RandomFunction[BinomialProcess[1 / 3], {0, 50000}, 3]ByteCount[TemporalData[<<3>>]]data = RandomFunction[BinomialProcess[1 / 3], {0, 50000}, 3]ByteCount[TemporalData[«4»]]验证数据实际上大于 $NotebookInlineStorageLimit:
ByteCount[data] > $NotebookInlineStorageLimit恢复 $HistoryLength 的默认值:
$HistoryLength = ∞;属性和关系 (1)
$NotebookInlineStorageLimit 只影响摘要框:
$NotebookInlineStorageLimit = 0;Range[150]EventSeries[{1, 5, 11, 19}]$OutputSizeLimit 影响所有输出:
$NotebookInlineStorageLimit = 2 ^ 20;
$OutputSizeLimit = 0;Range[150]EventSeries[{1, 5, 11, 19}]$OutputSizeLimit = 2 ^ 20;相关指南
文本
Wolfram Research (2020),$NotebookInlineStorageLimit,Wolfram 语言函数,https://reference.wolfram.com/language/ref/$NotebookInlineStorageLimit.html.
CMS
Wolfram 语言. 2020. "$NotebookInlineStorageLimit." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/$NotebookInlineStorageLimit.html.
APA
Wolfram 语言. (2020). $NotebookInlineStorageLimit. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/$NotebookInlineStorageLimit.html 年
BibTeX
@misc{reference.wolfram_2026_$notebookinlinestoragelimit, author="Wolfram Research", title="{$NotebookInlineStorageLimit}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/$NotebookInlineStorageLimit.html}", note=[Accessed: 25-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_$notebookinlinestoragelimit, organization={Wolfram Research}, title={$NotebookInlineStorageLimit}, year={2020}, url={https://reference.wolfram.com/language/ref/$NotebookInlineStorageLimit.html}, note=[Accessed: 25-August-2026]}