Project

EarthSciASTDiff

Analytical sparse Jacobians for EarthSciAST (.esm) models by symbolic differentiation of the expression AST.

Contents

This is the documentation for the older version v0.7.0. For the latest release, see v0.8.0.

parse_jacobian_blocks

Stable function · Serialize as a document block

Tier: stable · Kind: function · Topic: Serialize as a document block

JuliaPythonRust
parse_jacobian_blocksparse_jacobian_blocksparse_jacobian_blocks

Julia

parse_jacobian_blocks(x)
parse_jacobian_blocks(x) -> Vector{Any}

parse_jacobian_block over a model’s "jacobians" entry, which is either one block or an array of blocks with distinct wrt (esm-jacobian-spec.md §4); returns one (wrt, entries) per block, in order: (wrt::Symbol, Vector{JacEntry}) for a first-order block and (wrt::Tuple{Symbol,Symbol}, Vector{JacEntry2}) for a second-order pair, so the element type is Any once a model mixes the two. Dispatch on wrt (or on the entry type) rather than assuming the first form.

Source

Python

parse_jacobian_blocks(x) -> list

parse_jacobian_block over a model’s jacobians entry, which is either one block or a list of blocks with distinct wrt (spec §4); returns one (wrt, entries) per block, in order (wrt a str, or a tuple for a second-order pair).

Source

Rust

pub fn parse_jacobian_blocks(x: &Value) -> Result<Vec<ParsedBlock>, BandError>

parse_jacobian_block / parse_jacobian_block2 over a model’s jacobians entry, which is either one block or an array of blocks with distinct wrt (spec §4); one ParsedBlock per block, in order.

Source · Rust docs