From 84b534a1d2cc849d645626eb826c3234261adc4b Mon Sep 17 00:00:00 2001 From: Angel Ezquerra Date: Sat, 21 Oct 2023 23:55:23 +0200 Subject: [PATCH 1/6] Add a missing nim code block marker in the first steps tutorial --- docs/tuto.first_steps.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/tuto.first_steps.rst b/docs/tuto.first_steps.rst index 8bcd96380..5f54fd023 100644 --- a/docs/tuto.first_steps.rst +++ b/docs/tuto.first_steps.rst @@ -194,6 +194,7 @@ Take a look at the printing result of the aforementioned shape and try to understand the indexing shown on the top / right and how it relates to the different dimensions: +.. code:: nim let t1 = toSeq(1..144).toTensor().reshape(2,3,4,3,2) # Tensor[system.int] of shape "[2, 3, 4, 3, 2]" on backend "Cpu" # 0 | 1 From 348391d0f3fed9dddb17e8e07becb3f1812178b9 Mon Sep 17 00:00:00 2001 From: Angel Ezquerra Date: Sat, 21 Oct 2023 23:59:12 +0200 Subject: [PATCH 2/6] Add some padding to the "Technical reference" submenu to make it easier to use The "Technical reference" submenu is horizontal which with the default padding makes it quite hard to use. It is very easy to move the mouse outside of the menu and then the menu is closed. Adding some padding makes it easier to use. The drawback is that it looks a little different than the other menus, which are vertical. The ideal solution would be to make all the menus vertical, but since the "Technical reference" submenu is 2 levels deep this is not straightforward to do. --- docs/nimDocTemplates.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/nimDocTemplates.nim b/docs/nimDocTemplates.nim index e3e463cac..2baff0653 100644 --- a/docs/nimDocTemplates.nim +++ b/docs/nimDocTemplates.nim @@ -115,7 +115,7 @@ const headerTmpl* = """ Arraymancer Technical reference -
    +
      Core tensor API
        From 443a774bb9b7978bd5eac7c3116fab4beb97ae3e Mon Sep 17 00:00:00 2001 From: Angel Ezquerra Date: Sun, 22 Oct 2023 00:05:35 +0200 Subject: [PATCH 3/6] Fix the broken "Form me on github" ribbon --- docs/nimDocTemplates.nim | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/nimDocTemplates.nim b/docs/nimDocTemplates.nim index 2baff0653..dc36c4c22 100644 --- a/docs/nimDocTemplates.nim +++ b/docs/nimDocTemplates.nim @@ -91,7 +91,7 @@ function main() { -Fork me on GitHub +Fork me on GitHub
        @@ -117,46 +117,60 @@ const headerTmpl* = """ Technical reference From ab6d87f6573c94a2016e8059eff793d3dcc6b0e8 Mon Sep 17 00:00:00 2001 From: Angel Ezquerra Date: Sun, 22 Oct 2023 00:08:13 +0200 Subject: [PATCH 4/6] Remove non-existent performance notice from the TOC --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 568153778..606cbbfd3 100644 --- a/README.md +++ b/README.md @@ -221,7 +221,6 @@ Of them; she's murder'd of your galla? - [Arraymancer - A n-dimensional tensor (ndarray) library.](#arraymancer---a-n-dimensional-tensor-ndarray-library) - - [Performance notice on Nim 0.20 & compilation flags](#performance-notice-on-nim-020--compilation-flags) - [Show me some code](#show-me-some-code) - [Tensor creation and slicing](#tensor-creation-and-slicing) - [Reshaping and concatenation](#reshaping-and-concatenation) From cfb3f9181f2e76eaa6761056e4ba9d055a34f056 Mon Sep 17 00:00:00 2001 From: Angel Ezquerra Date: Sun, 22 Oct 2023 00:09:47 +0200 Subject: [PATCH 5/6] Make "What's new in Arraymancer" section "version agnostic" --- README.md | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/README.md b/README.md index 606cbbfd3..9b6c43205 100644 --- a/README.md +++ b/README.md @@ -497,19 +497,10 @@ Here is a comparative table of the core features. | Squeezing singleton dimension | [x] | [x] | [] | | Slicing + squeezing | [x] | [] | [] | -## What's new in Arraymancer v0.5.1 - July 2019 +## What's new in Arraymancer The full changelog is available in [changelog.md](./changelog.md). -Here are the highlights: - -- 0.20.x compatibility -- Complex support -- `Einsum` -- Naive whitespace tokenizer for NLP -- Fix height/width order when reading an image in tensor -- Preview of Laser backend for matrix multiplication without SIMD autodetection (already 5x faster on integer matrix multiplication) - ## 4 reasons why Arraymancer ### The Python community is struggling to bring Numpy up-to-speed From 2562f1b8dea593b49e53e0b701c24ff9aa0a5cda Mon Sep 17 00:00:00 2001 From: Angel Ezquerra Date: Sun, 22 Oct 2023 00:32:35 +0200 Subject: [PATCH 6/6] Hack to make the broken documentation dark mode look acceptable This is not a proper fix, but a hack removing most color and background-color entries in the docutils.css. We should probably make a better fix but this would do for now. --- docs/docutils.css | 109 +++------------------------------------------- 1 file changed, 7 insertions(+), 102 deletions(-) diff --git a/docs/docutils.css b/docs/docutils.css index b30428c84..bd4fb0260 100644 --- a/docs/docutils.css +++ b/docs/docutils.css @@ -33,9 +33,7 @@ body { font-weight: 400; font-size: 16px; line-height: 20px; - color: #444; - letter-spacing: 0.15px; - background-color: rgba(252, 248, 244, 0.45); } + letter-spacing: 0.15px; } /* Skeleton grid */ .container { position: relative; @@ -97,37 +95,28 @@ body { /* Customer Overrides */ .footer { text-align: center; - color: #969696; padding-top: 10%; } p.module-desc { font-size: 1.1em; - color: #666666; } -a.link-seesrc { - color: #aec7d2; +}a.link-seesrc { font-style: italic; } -a.link-seesrc:hover { - color: #6c9aae; } #toc-list { word-wrap: break-word; } ul.simple-toc { list-style: none; } ul.simple-toc a.reference-toplevel { font-weight: bold; - color: #0077b3; } +} ul.simple-toc-section { list-style-type: circle; - color: #6c9aae; } -ul.simple-toc-section a.reference { - color: #0077b3; } +} cite { font-style: italic !important; } dt > pre { border-color: rgba(0, 0, 0, 0.1); - background-color: rgba(255, 255, 255, 0.3); margin: 15px 0px 5px; } dd > pre { border-color: rgba(0, 0, 0, 0.1); - background-color: whitesmoke; margin-top: 8px; } .item > dd { margin-left: 10px; @@ -149,7 +138,6 @@ div.search-groupby { table.line-nums-table { border-radius: 4px; border: 1px solid #cccccc; - background-color: whitesmoke; border-collapse: separate; margin-top: 15px; margin-bottom: 25px; } @@ -161,7 +149,6 @@ table.line-nums-table { .line-nums-table td.blob-line-nums { width: 28px; } .line-nums-table td.blob-line-nums pre { - color: #b0b0b0; -webkit-filter: opacity(75%); text-align: right; border-color: transparent; @@ -173,11 +160,9 @@ table.line-nums-table { /* Docgen styles */ /* Links */ a { - color: #0077b3; text-decoration: none; } a:hover, a:focus { - color: #00334d; text-decoration: underline; } a:visited { color: #00334d; } @@ -207,7 +192,6 @@ img { -ms-interpolation-mode: bicubic; } @media print { * { - color: black !important; text-shadow: none !important; background: transparent !important; box-shadow: none !important; } @@ -368,7 +352,6 @@ pre { padding: 0 3px 2px; font-weight: 500; font-size: 12px; - color: #444444; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; } @@ -379,9 +362,7 @@ pre { } code { padding: 2px 4px; - color: #444444; white-space: nowrap; - background-color: white; border: 1px solid #777777; } pre { display: inline-block; @@ -394,7 +375,6 @@ pre { white-space: pre !important; overflow-y: hidden; overflow-x: visible; - background-color: rgba(0, 0, 0, 0.01); border: 1px solid #cccccc; -webkit-border-radius: 4px; -moz-border-radius: 4px; @@ -442,8 +422,6 @@ table th, table td { border-top: 0; } .table tbody + tbody { border-top: 2px solid #444444; } -.table .table { - background-color: rgba(252, 248, 244, 0.75); } .table-condensed th, .table-condensed td { padding: 4px 5px; } @@ -518,16 +496,8 @@ table th, table td { -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-topright: 4px; } -table.docutils th { - background-color: #e8e8e8; } -table.docutils tr:hover { - background-color: whitesmoke; } .table-striped tbody > tr:nth-child(odd) > td, -.table-striped tbody > tr:nth-child(odd) > th { - background-color: rgba(252, 248, 244, 0.75); } .table-hover tbody tr:hover > td, -.table-hover tbody tr:hover > th { - background-color: rgba(241, 222, 204, 0.75); } table td[class*="span"], table th[class*="span"], .row-fluid table td[class*="span"], @@ -542,7 +512,6 @@ table th[class*="span"], font-weight: 200; line-height: 30px; color: inherit; - background-color: rgba(230, 197, 164, 0.75); -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; } @@ -662,7 +631,6 @@ div.sidebar { margin: 0 0 0.5em 1em; border: medium outset; padding: 1em; - background-color: rgba(252, 248, 244, 0.75); width: 40%; float: right; clear: right; } @@ -759,24 +727,9 @@ pre.address { pre.literal-block, pre.doctest-block, pre.math, pre.code { margin-left: 2em; margin-right: 2em; } -pre.code .ln { - color: grey; } /* line numbers */ -pre.code, code { - background-color: #eeeeee; } -pre.code .comment, code .comment { - color: #5c6576; } pre.code .keyword, code .keyword { - color: #3B0D06; font-weight: bold; } -pre.code .literal.string, code .literal.string { - color: #0c5404; } -pre.code .name.builtin, code .name.builtin { - color: #352b84; } -pre.code .deleted, code .deleted { - background-color: #DEB0A1; } -pre.code .inserted, code .inserted { - background-color: #A3D289; } span.classifier { font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif; font-style: oblique; } @@ -802,8 +755,7 @@ table.docinfo { margin-top: 2em; margin-bottom: 2em; font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif !important; - color: #444444; } -table.docutils { +}table.docutils { margin-top: 0.5em; margin-bottom: 0.5em; } table.footnote { @@ -824,61 +776,14 @@ h4 tt.docutils, h5 tt.docutils, h6 tt.docutils { font-size: 100%; } ul.auto-toc { list-style-type: none; } -span.DecNumber { - color: #252dbe; } -span.BinNumber { - color: #252dbe; } -span.HexNumber { - color: #252dbe; } -span.OctNumber { - color: #252dbe; } -span.FloatNumber { - color: #252dbe; } -span.Identifier { - color: #3b3b3b; } span.Keyword { - font-weight: 600; - color: #5e8f60; } -span.StringLit { - color: #a4255b; } -span.LongStringLit { - color: #a4255b; } -span.CharLit { - color: #a4255b; } -span.EscapeSequence { - color: black; } -span.Operator { - color: black; } -span.Punctuation { - color: black; } + font-weight: 600;} span.Comment, span.LongComment { font-style: italic; font-weight: 400; - color: #484a86; } -span.RegularExpression { - color: darkviolet; } -span.TagStart { - color: darkviolet; } -span.TagEnd { - color: darkviolet; } -span.Key { - color: #252dbe; } -span.Value { - color: #252dbe; } -span.RawData { - color: #a4255b; } -span.Assembler { - color: #252dbe; } -span.Preprocessor { - color: #252dbe; } -span.Directive { - color: #252dbe; } -span.Command, span.Rule, span.Hyperlink, span.Label, span.Reference, -span.Other { - color: black; } +} /* Pop type, const, proc, and iterator defs in nim def blocks */ dt pre > span.Identifier, dt pre > span.Operator { - color: #155da4; font-weight: 700; } dt pre > span.Identifier ~ span.Identifier, dt pre > span.Operator ~ span.Identifier { color: inherit;