Skip to content

Commit 1b0df36

Browse files
authored
(core) future-proofing by moving from deprecared existsFile to fileExists function; docs updates
1 parent 9a03d59 commit 1b0df36

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

nimplex.nim

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ when defined(nimdoc):
3434
import utils/stitching
3535
# Check if `docs/changelog.nim` file is present in the project directory and include it in the documentation if it is.
3636
import std/os
37-
when existsFile("docs/changelog.nim"):
37+
when fileExists("docs/changelog.nim"):
3838
import docs/changelog
3939

4040
# GRID
@@ -243,15 +243,7 @@ proc attainable2elemental*(simplexPoints: Tensor[SomeNumber],
243243
## space serving as base components of the **attainable** space given in `simplexPoints`. The `components` can be a row-consistnet mixed list list of integer and fractional compositions, and will be normalized
244244
## per-row to allow for both types of inputs. Please note that it will *not* automatically normalize the `simplexPoints` rows, so if you give it integer compositions, you will get float values summing to `ndiv`
245245
## rather than `1`.
246-
runnableExamples:
247-
const components = @[
248-
@[0.94, 0.05, 0.01], # Fe95 C5 Mo1
249-
@[3.0, 1.0, 0.0], # Fe3C
250-
@[0.2, 0.0, 0.8] # Fe20 Mo80
251-
]
252-
let grid = simplex_grid_fractional(3, 4)
253-
let elementalGrid = grid.attainable2elemental(components)
254-
echo elementalGrid
246+
255247
# Tensor of components which can be "integer" ([2,2,1]) or "fractional" ([0.4,0.4,0.2]) compositions
256248
var cmpTensor: Tensor[float] = components.mapIt(it.mapIt(it.float)).toTensor()
257249
# Normalize components to sum to 1

0 commit comments

Comments
 (0)