# cf.Field.replace_construct¶

Field.replace_construct(*identity, new=None, copy=True, **filter_kwargs)[source]

Replacement assigns the same construct key and, if applicable, the domain axes of the original construct to the new, replacing construct.

New in version 3.0.0.

Parameters
identity: optional

Select the unique construct returned by f.construct(*identity, **filter_kwargs). See construct for details.

new:

The new construct to replace that selected by the identity parameter.

copy: bool, optional

If True then set a copy of the new construct. By default the construct is copied.

filter_kwargs: optional

Keyword arguments as accepted by Constructs.filter that define additional construct selection criteria.

New in version 3.9.0.

construct:

Deprecated at version 3.9.0

Returns

The construct that was replaced.

Examples:

>>> f.replace_construct('X', new=X_construct)
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.3327174186706543, "perplexity": 20185.146819857262}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-49/segments/1637964359082.76/warc/CC-MAIN-20211130232232-20211201022232-00288.warc.gz"}