{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {},
  "_ordered_sections": [],
  "item_file": null,
  "item_line": null,
  "item_type": null,
  "aliases": [],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [],
  "signature": null,
  "references": null,
  "qa": "f2py:signature-file",
  "arbitrary": [
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The interface definition file (.pyf) is how you can fine-tune the interface between Python and Fortran. The syntax specification for signature files ("
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": ".pyf"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " files) is modeled on the Fortran 90/95 language specification. Almost all Fortran standard constructs are understood, both in free and fixed format (recall that Fortran 77 is a subset of Fortran 90/95). F2PY introduces some extensions to the Fortran 90/95 language specification that help in the design of the Fortran to Python interface, making it more \"Pythonic\"."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Signature files may contain arbitrary Fortran code so that any Fortran 90/95 codes can be treated as signature files. F2PY silently ignores Fortran constructs that are irrelevant for creating the interface. However, this also means that syntax errors are not caught by F2PY and will only be caught when the library is built."
            }
          ]
        },
        {
          "__type": "Admonition",
          "__tag": 4056,
          "kind": "note",
          "base_type": "note",
          "children": [
            {
              "__type": "AdmonitionTitle",
              "__tag": 4055,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "note "
                }
              ]
            },
            {
              "__type": "Paragraph",
              "__tag": 4045,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "Currently, F2PY may fail with some valid Fortran constructs. If this happens, you can check the "
                },
                {
                  "__type": "Link",
                  "__tag": 4049,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "NumPy GitHub issue tracker"
                    }
                  ],
                  "url": "https://github.com/numpy/numpy/issues",
                  "title": ""
                },
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": " for possible workarounds or work-in-progress ideas."
                }
              ]
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "In general, the contents of the signature files are case-sensitive. When scanning Fortran codes to generate a signature file, F2PY lowers all cases automatically except in multi-line blocks or when the "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "--no-lower"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " option is used."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The syntax of signature files is presented below."
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Signature file"
        }
      ],
      "level": 0,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Signature files syntax"
        }
      ],
      "level": 1,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "A signature file may contain one (recommended) or more "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "python module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " blocks. The "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "python module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " block describes the contents of a Python/C extension module "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "<modulename>module.c"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " that F2PY generates."
            }
          ]
        },
        {
          "__type": "Admonition",
          "__tag": 4056,
          "kind": "warning",
          "base_type": "warning",
          "children": [
            {
              "__type": "AdmonitionTitle",
              "__tag": 4055,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "warning "
                }
              ]
            },
            {
              "__type": "Paragraph",
              "__tag": 4045,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "Exception: if "
                },
                {
                  "__type": "InlineCode",
                  "__tag": 4051,
                  "value": "<modulename>"
                },
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": " contains a substring "
                },
                {
                  "__type": "InlineCode",
                  "__tag": 4051,
                  "value": "__user__"
                },
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": ", then the corresponding "
                },
                {
                  "__type": "InlineCode",
                  "__tag": 4051,
                  "value": "python module"
                },
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": " block describes the signatures of call-back functions (see "
                },
                {
                  "__type": "CrossRef",
                  "__tag": 4002,
                  "value": "Call-back arguments",
                  "reference": {
                    "__type": "LocalRef",
                    "__tag": 4022,
                    "kind": "docs",
                    "path": "f2py:python-usage"
                  },
                  "kind": "exists"
                },
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": ")."
                }
              ]
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "A "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "python module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " block has the following structure    "
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": "python module <modulename>\n  [<usercode statement>]...\n  [\n  interface\n    <usercode statement>\n    <Fortran block data signatures>\n    <Fortran/C routine signatures>\n  end [interface]\n  ]...\n  [\n  interface\n    module <F90 modulename>\n      [<F90 module data type declarations>]\n      [<F90 module routine signatures>]\n    end [module [<F90 modulename>]]\n  end [interface]\n  ]...\nend [python module [<modulename>]]",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Here brackets "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "[]"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " indicate an optional section, dots "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "..."
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " indicate one or more of a previous section. So, "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "[]..."
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is to be read as zero or more of a previous section."
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Python module block"
        }
      ],
      "level": 2,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The signature of a Fortran routine has the following structure    "
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": "[<typespec>] function | subroutine <routine name> \\\n              [ ( [<arguments>] ) ] [ result ( <entityname> ) ]\n  [<argument/variable type declarations>]\n  [<argument/variable attribute statements>]\n  [<use statements>]\n  [<common block statements>]\n  [<other statements>]\nend [ function | subroutine [<routine name>] ]",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "From a Fortran routine signature F2PY generates a Python/C extension function that has the following signature    "
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": "def <routine name>(<required arguments>[,<optional arguments>]):\n     ...\n     return <return variables>",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The signature of a Fortran block data has the following structure    "
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": "block data [ <block data name> ]\n  [<variable type declarations>]\n  [<variable attribute statements>]\n  [<use statements>]\n  [<common block statements>]\n  [<include statements>]\nend [ block data [<block data name>] ]",
          "execution_status": null
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Fortran/C routine signatures"
        }
      ],
      "level": 2,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The definition of the "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "<argument/variable type declaration>"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " part is"
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": "<typespec> [ [<attrspec>] :: ] <entitydecl>",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "where"
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": "<typespec> := byte | character [<charselector>]\n           | complex [<kindselector>] | real [<kindselector>]\n           | double complex | double precision\n           | integer [<kindselector>] | logical [<kindselector>]\n\n<charselector> := * <charlen>\n               | ( [len=] <len> [ , [kind=] <kind>] )\n               | ( kind= <kind> [ , len= <len> ] )\n<kindselector> := * <intlen> | ( [kind=] <kind> )\n\n<entitydecl> := <name> [ [ * <charlen> ] [ ( <arrayspec> ) ]\n                      | [ ( <arrayspec> ) ] * <charlen> ]\n                     | [ / <init_expr> / | = <init_expr> ] \\\n                       [ , <entitydecl> ]",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "and"
            }
          ]
        },
        {
          "__type": "BulletList",
          "__tag": 4053,
          "ordered": false,
          "start": 1,
          "children": [
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<attrspec>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is a comma separated list of "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "attributes_",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ";"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<arrayspec>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is a comma separated list of dimension bounds;"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<init_expr>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is a "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "C expression",
                      "reference": {
                        "__type": "LocalRef",
                        "__tag": 4022,
                        "kind": "docs",
                        "path": "f2py:signature-file"
                      },
                      "kind": "exists"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ";"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<intlen>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " may be negative integer for "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "integer"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " type   specifications. In such cases "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "integer*<negintlen>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " represents   unsigned C integers;"
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "If an argument has no "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "<argument type declaration>"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", its type is determined by applying "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "implicit"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " rules to its name."
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Type declarations"
        }
      ],
      "level": 2,
      "target": "type-declarations"
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Statements"
        }
      ],
      "level": 2,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "<argument/variable attribute statement>"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is similar to the "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "<argument/variable type declaration>"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", but without "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "<typespec>"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "An attribute statement cannot contain other attributes, and "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "<entitydecl>"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " can be only a list of names. See "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "f2py-attributes",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "docs",
                "path": "f2py:signature-file"
              },
              "kind": "exists"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " for more details on the attributes that can be used by F2PY."
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Attribute statements"
        }
      ],
      "level": 3,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "BulletList",
          "__tag": 4053,
          "ordered": false,
          "start": 1,
          "children": [
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The definition of the "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<use statement>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " part is"
                    }
                  ]
                },
                {
                  "__type": "Code",
                  "__tag": 4050,
                  "value": "use <modulename> [ , <rename_list> | , ONLY : <only_list> ]",
                  "execution_status": null
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "where"
                    }
                  ]
                },
                {
                  "__type": "Code",
                  "__tag": 4050,
                  "value": "<rename_list> := <local_name> => <use_name> [ , <rename_list> ]",
                  "execution_status": null
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Currently F2PY uses "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "use"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " statements only for linking call-back modules and   "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "external"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " arguments (call-back functions). See "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "Call-back arguments",
                      "reference": {
                        "__type": "LocalRef",
                        "__tag": 4022,
                        "kind": "docs",
                        "path": "f2py:python-usage"
                      },
                      "kind": "exists"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Use statements"
        }
      ],
      "level": 3,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "BulletList",
          "__tag": 4053,
          "ordered": false,
          "start": 1,
          "children": [
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The definition of the "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<common block statement>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " part is"
                    }
                  ]
                },
                {
                  "__type": "Code",
                  "__tag": 4050,
                  "value": "common / <common name> / <shortentitydecl>",
                  "execution_status": null
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "where"
                    }
                  ]
                },
                {
                  "__type": "Code",
                  "__tag": 4050,
                  "value": "<shortentitydecl> := <name> [ ( <arrayspec> ) ] [ , <shortentitydecl> ]",
                  "execution_status": null
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "If a "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "python module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " block contains two or more "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "common"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " blocks   with the same name, the variables from the additional declarations   are appended.  The types of variables in "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<shortentitydecl>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " are   defined using "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<argument type declarations>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". Note that the   corresponding "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<argument type declarations>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " may contain array   specifications; then these need not be specified in "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<shortentitydecl>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Common block statements"
        }
      ],
      "level": 3,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "BulletList",
          "__tag": 4053,
          "ordered": false,
          "start": 1,
          "children": [
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<other statement>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " part refers to any other Fortran language   constructs that are not described above. F2PY ignores most of them   except the following:"
                    }
                  ]
                },
                {
                  "__type": "BulletList",
                  "__tag": 4053,
                  "ordered": false,
                  "start": 1,
                  "children": [
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "call"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": " statements and function calls of "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "external"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": " arguments     (see "
                            },
                            {
                              "__type": "CrossRef",
                              "__tag": 4002,
                              "value": "more details on external arguments",
                              "reference": {
                                "__type": "LocalRef",
                                "__tag": 4022,
                                "kind": "docs",
                                "path": "f2py:signature-file"
                              },
                              "kind": "exists"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": ");"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "DefList",
                          "__tag": 4033,
                          "children": [
                            {
                              "__type": "DefListItem",
                              "__tag": 4037,
                              "dt": {
                                "__type": "Paragraph",
                                "__tag": 4045,
                                "children": [
                                  {
                                    "__type": "InlineCode",
                                    "__tag": 4051,
                                    "value": "include"
                                  },
                                  {
                                    "__type": "Text",
                                    "__tag": 4046,
                                    "value": " statements"
                                  }
                                ]
                              },
                              "dd": [
                                {
                                  "__type": "Code",
                                  "__tag": 4050,
                                  "value": "include '<filename>'\ninclude \"<filename>\"",
                                  "execution_status": null
                                },
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "If a file "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "<filename>"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " does not exist, the "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "include"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "       statement is ignored. Otherwise, the file "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "<filename>"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " is       included to a signature file.  "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "include"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " statements can be used       in any part of a signature file, also outside the Fortran/C       routine signature blocks."
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "DefList",
                          "__tag": 4033,
                          "children": [
                            {
                              "__type": "DefListItem",
                              "__tag": 4037,
                              "dt": {
                                "__type": "Paragraph",
                                "__tag": 4045,
                                "children": [
                                  {
                                    "__type": "InlineCode",
                                    "__tag": 4051,
                                    "value": "implicit"
                                  },
                                  {
                                    "__type": "Text",
                                    "__tag": 4046,
                                    "value": " statements"
                                  }
                                ]
                              },
                              "dd": [
                                {
                                  "__type": "Code",
                                  "__tag": 4050,
                                  "value": "        implicit none\n\timplicit <list of implicit maps>",
                                  "execution_status": null
                                },
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "where"
                                    }
                                  ]
                                },
                                {
                                  "__type": "Code",
                                  "__tag": 4050,
                                  "value": "<implicit map> := <typespec> ( <list of letters or range of letters> )",
                                  "execution_status": null
                                },
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "Implicit rules are used to determine the type specification of       a variable (from the first-letter of its name) if the variable       is not defined using "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "<variable type declaration>"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": ".  Default       implicit rules are given by:"
                                    }
                                  ]
                                },
                                {
                                  "__type": "Code",
                                  "__tag": 4050,
                                  "value": "implicit real (a-h,o-z,$_), integer (i-m)",
                                  "execution_status": null
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "DefList",
                          "__tag": 4033,
                          "children": [
                            {
                              "__type": "DefListItem",
                              "__tag": 4037,
                              "dt": {
                                "__type": "Paragraph",
                                "__tag": 4045,
                                "children": [
                                  {
                                    "__type": "InlineCode",
                                    "__tag": 4051,
                                    "value": "entry"
                                  },
                                  {
                                    "__type": "Text",
                                    "__tag": 4046,
                                    "value": " statements"
                                  }
                                ]
                              },
                              "dd": [
                                {
                                  "__type": "Code",
                                  "__tag": 4050,
                                  "value": "entry <entry name> [([<arguments>])]",
                                  "execution_status": null
                                },
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "F2PY generates wrappers for all entry names using the signature       of the routine block."
                                    }
                                  ]
                                },
                                {
                                  "__type": "Admonition",
                                  "__tag": 4056,
                                  "kind": "note",
                                  "base_type": "note",
                                  "children": [
                                    {
                                      "__type": "AdmonitionTitle",
                                      "__tag": 4055,
                                      "children": [
                                        {
                                          "__type": "Text",
                                          "__tag": 4046,
                                          "value": "note "
                                        }
                                      ]
                                    },
                                    {
                                      "__type": "DefList",
                                      "__tag": 4033,
                                      "children": [
                                        {
                                          "__type": "DefListItem",
                                          "__tag": 4037,
                                          "dt": {
                                            "__type": "Paragraph",
                                            "__tag": 4045,
                                            "children": [
                                              {
                                                "__type": "Text",
                                                "__tag": 4046,
                                                "value": "The "
                                              },
                                              {
                                                "__type": "InlineCode",
                                                "__tag": 4051,
                                                "value": "entry"
                                              },
                                              {
                                                "__type": "Text",
                                                "__tag": 4046,
                                                "value": " statement can be used to describe the signature of an"
                                              }
                                            ]
                                          },
                                          "dd": [
                                            {
                                              "__type": "Paragraph",
                                              "__tag": 4045,
                                              "children": [
                                                {
                                                  "__type": "Text",
                                                  "__tag": 4046,
                                                  "value": "arbitrary subroutine or function allowing F2PY to generate a number of       wrappers from only one routine block signature. There are few       restrictions while doing this: "
                                                },
                                                {
                                                  "__type": "InlineCode",
                                                  "__tag": 4051,
                                                  "value": "fortranname"
                                                },
                                                {
                                                  "__type": "Text",
                                                  "__tag": 4046,
                                                  "value": " cannot be used,       "
                                                },
                                                {
                                                  "__type": "InlineCode",
                                                  "__tag": 4051,
                                                  "value": "callstatement"
                                                },
                                                {
                                                  "__type": "Text",
                                                  "__tag": 4046,
                                                  "value": " and "
                                                },
                                                {
                                                  "__type": "InlineCode",
                                                  "__tag": 4051,
                                                  "value": "callprotoargument"
                                                },
                                                {
                                                  "__type": "Text",
                                                  "__tag": 4046,
                                                  "value": " can be used only if they are       valid for all entry routines, etc."
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Other statements"
        }
      ],
      "level": 3,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "In addition, F2PY introduces the following statements:"
            }
          ]
        },
        {
          "__type": "DefList",
          "__tag": 4033,
          "children": [
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "InlineCode",
                    "__tag": 4051,
                    "value": "threadsafe"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Uses a "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "Py_BEGIN_ALLOW_THREADS .. Py_END_ALLOW_THREADS"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " block   around the call to Fortran/C function."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "InlineCode",
                    "__tag": 4051,
                    "value": "callstatement <C-expr|multi-line block>"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Replaces the  F2PY generated call statement to Fortran/C function with   "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<C-expr|multi-line block>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". The wrapped Fortran/C function is available   as "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "(*f2py_func)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "To raise an exception, set "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "f2py_success = 0"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " in "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<C-expr|multi-line   block>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "InlineCode",
                    "__tag": 4051,
                    "value": "callprotoargument <C-typespecs>"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "When the "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "callstatement"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " statement is used, F2PY may not generate proper   prototypes for Fortran/C functions (because "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<C-expr>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " may contain function   calls, and F2PY has no way to determine what should be the proper prototype)."
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "With this statement you can explicitly specify the arguments of the   corresponding prototype      "
                    }
                  ]
                },
                {
                  "__type": "Code",
                  "__tag": 4050,
                  "value": "extern <return type> FUNC_F(<routine name>,<ROUTINE NAME>)(<callprotoargument>);",
                  "execution_status": null
                }
              ]
            },
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "InlineCode",
                    "__tag": 4051,
                    "value": "fortranname [<actual Fortran/C routine name>]"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "F2PY allows for the use of an arbitrary "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<routine name>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " for a given   Fortran/C function. Then this statement is used for the "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<actual   Fortran/C routine name>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "If "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "fortranname"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " statement is used without   "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<actual Fortran/C routine name>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " then a dummy wrapper is   generated."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "InlineCode",
                    "__tag": 4051,
                    "value": "usercode <multi-line block>"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "When this is used inside a "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "python module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " block, the given C code will   be inserted to generated C/API source just before wrapper function   definitions."
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Here you can define arbitrary C functions to be used for the   initialization of optional arguments."
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "For example, if "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "usercode"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is used twice inside "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "python module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " block   then the second multi-line block is inserted after the definition of   the external routines."
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "When used inside "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<routine signature>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", then the given C code will be   inserted into the corresponding wrapper function just after the   declaration of  variables but before any C statements. So, the   "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "usercode"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " follow-up can contain both declarations and C statements."
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "When used inside the first "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "interface"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " block, then the given C code will   be inserted at the end of the initialization function of the extension   module. This is how the extension modules dictionary can be modified and   has many use-cases; for example, to define additional variables."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "InlineCode",
                    "__tag": 4051,
                    "value": "pymethoddef <multiline block>"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "This is a multi-line block which will be inserted into the definition of a   module methods "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "PyMethodDef"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "-array. It must be a comma-separated list of   C arrays (see "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "Extending and Embedding",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " Python documentation for   details).  "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "pymethoddef"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " statement can be used only inside "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "python   module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " block."
                    }
                  ]
                },
                {
                  "__type": "Unimplemented",
                  "__tag": 4018,
                  "placeholder": "target",
                  "value": "__ https://docs.python.org/extending/index.html"
                }
              ]
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "F2PY statements"
        }
      ],
      "level": 3,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The following attributes can be used by F2PY."
            }
          ]
        },
        {
          "__type": "DefList",
          "__tag": 4033,
          "children": [
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "InlineCode",
                    "__tag": 4051,
                    "value": "optional"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The corresponding argument is moved to the end of "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<optional arguments>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "   list. A default value for an optional argument can be specified via   "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<init_expr>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " (see the "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "entitydecl"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "definition",
                      "reference": {
                        "__type": "LocalRef",
                        "__tag": 4022,
                        "kind": "docs",
                        "path": "f2py:signature-file"
                      },
                      "kind": "exists"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ")"
                    }
                  ]
                },
                {
                  "__type": "Admonition",
                  "__tag": 4056,
                  "kind": "note",
                  "base_type": "note",
                  "children": [
                    {
                      "__type": "AdmonitionTitle",
                      "__tag": 4055,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "note "
                        }
                      ]
                    },
                    {
                      "__type": "BulletList",
                      "__tag": 4053,
                      "ordered": false,
                      "start": 1,
                      "children": [
                        {
                          "__type": "ListItem",
                          "__tag": 4054,
                          "children": [
                            {
                              "__type": "Paragraph",
                              "__tag": 4045,
                              "children": [
                                {
                                  "__type": "Text",
                                  "__tag": 4046,
                                  "value": "The default value must be given as a valid C expression.   * Whenever "
                                },
                                {
                                  "__type": "InlineCode",
                                  "__tag": 4051,
                                  "value": "<init_expr>"
                                },
                                {
                                  "__type": "Text",
                                  "__tag": 4046,
                                  "value": " is used, the "
                                },
                                {
                                  "__type": "InlineCode",
                                  "__tag": 4051,
                                  "value": "optional"
                                },
                                {
                                  "__type": "Text",
                                  "__tag": 4046,
                                  "value": " attribute is set     automatically by F2PY.   * For an optional array argument, all its dimensions must be bounded."
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "InlineCode",
                    "__tag": 4051,
                    "value": "required"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The corresponding argument with this attribute is considered mandatory. This   is the default. "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "required"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " should only be specified if there is a need to   disable the automatic "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "optional"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " setting when "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<init_expr>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is used."
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "If a Python "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "None"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " object is used as a required argument, the argument is   treated as optional. That is, in the case of array arguments, the memory is   allocated. If "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<init_expr>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is given, then the corresponding initialization   is carried out."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "InlineCode",
                    "__tag": 4051,
                    "value": "dimension(<arrayspec>)"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The corresponding variable is considered as an array with dimensions given in   "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<arrayspec>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "InlineCode",
                    "__tag": 4051,
                    "value": "intent(<intentspec>)"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "This specifies the \"intention\" of the corresponding argument. "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<intentspec>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "   is a comma separated list of the following keys:"
                    }
                  ]
                },
                {
                  "__type": "BulletList",
                  "__tag": 4053,
                  "ordered": false,
                  "start": 1,
                  "children": [
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "DefList",
                          "__tag": 4033,
                          "children": [
                            {
                              "__type": "DefListItem",
                              "__tag": 4037,
                              "dt": {
                                "__type": "Paragraph",
                                "__tag": 4045,
                                "children": [
                                  {
                                    "__type": "InlineCode",
                                    "__tag": 4051,
                                    "value": "in"
                                  }
                                ]
                              },
                              "dd": [
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "The corresponding argument is considered to be input-only. This means that       the value of the argument is passed to a Fortran/C function and that the       function is expected to not change the value of this argument."
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "DefList",
                          "__tag": 4033,
                          "children": [
                            {
                              "__type": "DefListItem",
                              "__tag": 4037,
                              "dt": {
                                "__type": "Paragraph",
                                "__tag": 4045,
                                "children": [
                                  {
                                    "__type": "InlineCode",
                                    "__tag": 4051,
                                    "value": "inout"
                                  }
                                ]
                              },
                              "dd": [
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "The corresponding argument is marked for input/output or as an "
                                    },
                                    {
                                      "__type": "Emphasis",
                                      "__tag": 4047,
                                      "children": [
                                        {
                                          "__type": "Text",
                                          "__tag": 4046,
                                          "value": "in situ"
                                        }
                                      ]
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "       output argument. "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(inout)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " arguments can be only       "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "contiguous"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " NumPy arrays (in either the Fortran or C sense) with       proper type and size. The latter coincides with the default contiguous       concept used in NumPy and is effective only if "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(c)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " is used. F2PY       assumes Fortran contiguous arguments by default."
                                    }
                                  ]
                                },
                                {
                                  "__type": "Admonition",
                                  "__tag": 4056,
                                  "kind": "note",
                                  "base_type": "note",
                                  "children": [
                                    {
                                      "__type": "AdmonitionTitle",
                                      "__tag": 4055,
                                      "children": [
                                        {
                                          "__type": "Text",
                                          "__tag": 4046,
                                          "value": "note "
                                        }
                                      ]
                                    },
                                    {
                                      "__type": "DefList",
                                      "__tag": 4033,
                                      "children": [
                                        {
                                          "__type": "DefListItem",
                                          "__tag": 4037,
                                          "dt": {
                                            "__type": "Paragraph",
                                            "__tag": 4045,
                                            "children": [
                                              {
                                                "__type": "Text",
                                                "__tag": 4046,
                                                "value": "Using "
                                              },
                                              {
                                                "__type": "InlineCode",
                                                "__tag": 4051,
                                                "value": "intent(inout)"
                                              },
                                              {
                                                "__type": "Text",
                                                "__tag": 4046,
                                                "value": " is generally not recommended, as it can cause"
                                              }
                                            ]
                                          },
                                          "dd": [
                                            {
                                              "__type": "Paragraph",
                                              "__tag": 4045,
                                              "children": [
                                                {
                                                  "__type": "Text",
                                                  "__tag": 4046,
                                                  "value": "unexpected results. For example, scalar arguments using       "
                                                },
                                                {
                                                  "__type": "InlineCode",
                                                  "__tag": 4051,
                                                  "value": "intent(inout)"
                                                },
                                                {
                                                  "__type": "Text",
                                                  "__tag": 4046,
                                                  "value": " are assumed to be array objects in order to have       "
                                                },
                                                {
                                                  "__type": "Emphasis",
                                                  "__tag": 4047,
                                                  "children": [
                                                    {
                                                      "__type": "Text",
                                                      "__tag": 4046,
                                                      "value": "in situ"
                                                    }
                                                  ]
                                                },
                                                {
                                                  "__type": "Text",
                                                  "__tag": 4046,
                                                  "value": " changes be effective. Use "
                                                },
                                                {
                                                  "__type": "InlineCode",
                                                  "__tag": 4051,
                                                  "value": "intent(in,out)"
                                                },
                                                {
                                                  "__type": "Text",
                                                  "__tag": 4046,
                                                  "value": " instead."
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "See also the "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(inplace)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " attribute."
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "DefList",
                          "__tag": 4033,
                          "children": [
                            {
                              "__type": "DefListItem",
                              "__tag": 4037,
                              "dt": {
                                "__type": "Paragraph",
                                "__tag": 4045,
                                "children": [
                                  {
                                    "__type": "InlineCode",
                                    "__tag": 4051,
                                    "value": "inplace"
                                  }
                                ]
                              },
                              "dd": [
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "The corresponding argument is considered to be an input/output or "
                                    },
                                    {
                                      "__type": "Emphasis",
                                      "__tag": 4047,
                                      "children": [
                                        {
                                          "__type": "Text",
                                          "__tag": 4046,
                                          "value": "in situ"
                                        }
                                      ]
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " output       argument. "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(inplace)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " arguments must be NumPy arrays of a proper       size. If the type of an array is not \"proper\" or the array is       non-contiguous then the array will be modified in-place to fix the type and       make it contiguous."
                                    }
                                  ]
                                },
                                {
                                  "__type": "Admonition",
                                  "__tag": 4056,
                                  "kind": "note",
                                  "base_type": "note",
                                  "children": [
                                    {
                                      "__type": "AdmonitionTitle",
                                      "__tag": 4055,
                                      "children": [
                                        {
                                          "__type": "Text",
                                          "__tag": 4046,
                                          "value": "note "
                                        }
                                      ]
                                    },
                                    {
                                      "__type": "Paragraph",
                                      "__tag": 4045,
                                      "children": [
                                        {
                                          "__type": "Text",
                                          "__tag": 4046,
                                          "value": "Using "
                                        },
                                        {
                                          "__type": "InlineCode",
                                          "__tag": 4051,
                                          "value": "intent(inplace)"
                                        },
                                        {
                                          "__type": "Text",
                                          "__tag": 4046,
                                          "value": " is generally not recommended either."
                                        }
                                      ]
                                    },
                                    {
                                      "__type": "Blockquote",
                                      "__tag": 4059,
                                      "children": [
                                        {
                                          "__type": "Paragraph",
                                          "__tag": 4045,
                                          "children": [
                                            {
                                              "__type": "Text",
                                              "__tag": 4046,
                                              "value": "For example, when slices have been taken from an "
                                            },
                                            {
                                              "__type": "InlineCode",
                                              "__tag": 4051,
                                              "value": "intent(inplace)"
                                            },
                                            {
                                              "__type": "Text",
                                              "__tag": 4046,
                                              "value": " argument       then after in-place changes, the data pointers for the slices may point to       an unallocated memory area."
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "DefList",
                          "__tag": 4033,
                          "children": [
                            {
                              "__type": "DefListItem",
                              "__tag": 4037,
                              "dt": {
                                "__type": "Paragraph",
                                "__tag": 4045,
                                "children": [
                                  {
                                    "__type": "InlineCode",
                                    "__tag": 4051,
                                    "value": "out"
                                  }
                                ]
                              },
                              "dd": [
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "The corresponding argument is considered to be a return variable. It is appended to the       "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "<returned variables>"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " list. Using "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(out)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " sets "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(hide)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "       automatically, unless  "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(in)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " or "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(inout)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " are specified       as well."
                                    }
                                  ]
                                },
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "By default, returned multidimensional arrays are Fortran-contiguous. If       "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(c)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " attribute is used, then the returned multidimensional arrays       are C-contiguous."
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "DefList",
                          "__tag": 4033,
                          "children": [
                            {
                              "__type": "DefListItem",
                              "__tag": 4037,
                              "dt": {
                                "__type": "Paragraph",
                                "__tag": 4045,
                                "children": [
                                  {
                                    "__type": "InlineCode",
                                    "__tag": 4051,
                                    "value": "hide"
                                  }
                                ]
                              },
                              "dd": [
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "The corresponding argument is removed from the list of required or optional       arguments. Typically "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(hide)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " is used with "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(out)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "       or when "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "<init_expr>"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " completely determines the value of the       argument like in the following example          "
                                    }
                                  ]
                                },
                                {
                                  "__type": "Code",
                                  "__tag": 4050,
                                  "value": "integer intent(hide),depend(a) :: n = len(a)\nreal intent(in),dimension(n) :: a",
                                  "execution_status": null
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "DefList",
                          "__tag": 4033,
                          "children": [
                            {
                              "__type": "DefListItem",
                              "__tag": 4037,
                              "dt": {
                                "__type": "Paragraph",
                                "__tag": 4045,
                                "children": [
                                  {
                                    "__type": "InlineCode",
                                    "__tag": 4051,
                                    "value": "c"
                                  }
                                ]
                              },
                              "dd": [
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "The corresponding argument is treated as a C scalar or C array argument. For the case       of a scalar argument, its value is passed to a C function as a C scalar       argument (recall that Fortran scalar arguments are actually C pointer       arguments).  For array arguments, the wrapper function is assumed to treat       multidimensional arrays as C-contiguous arrays."
                                    }
                                  ]
                                },
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "There is no need to use "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(c)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " for one-dimensional       arrays, irrespective of whether the wrapped function is in Fortran or C.       This is because the concepts of Fortran- and C contiguity overlap in       one-dimensional cases."
                                    }
                                  ]
                                },
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "If "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(c)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " is used as a statement but without an entity       declaration list, then F2PY adds the "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(c)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " attribute to all       arguments."
                                    }
                                  ]
                                },
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "Also, when wrapping C functions, one must use "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(c)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "       attribute for "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "<routine name>"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " in order to disable Fortran       specific "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "F_FUNC(..,..)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " macros."
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "DefList",
                          "__tag": 4033,
                          "children": [
                            {
                              "__type": "DefListItem",
                              "__tag": 4037,
                              "dt": {
                                "__type": "Paragraph",
                                "__tag": 4045,
                                "children": [
                                  {
                                    "__type": "InlineCode",
                                    "__tag": 4051,
                                    "value": "cache"
                                  }
                                ]
                              },
                              "dd": [
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "The corresponding argument is treated as junk memory. No Fortran nor C contiguity       checks are carried out. Using "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(cache)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " makes sense only for array       arguments, also in conjunction with "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(hide)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " or "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "optional"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "       attributes."
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "DefList",
                          "__tag": 4033,
                          "children": [
                            {
                              "__type": "DefListItem",
                              "__tag": 4037,
                              "dt": {
                                "__type": "Paragraph",
                                "__tag": 4045,
                                "children": [
                                  {
                                    "__type": "InlineCode",
                                    "__tag": 4051,
                                    "value": "copy"
                                  }
                                ]
                              },
                              "dd": [
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "Ensures that the original contents of "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(in)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " argument is       preserved. Typically used with the "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(in,out)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " attribute. F2PY       creates an optional argument "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "overwrite_<argument name>"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " with the       default value "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "0"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "."
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "DefList",
                          "__tag": 4033,
                          "children": [
                            {
                              "__type": "DefListItem",
                              "__tag": 4037,
                              "dt": {
                                "__type": "Paragraph",
                                "__tag": 4045,
                                "children": [
                                  {
                                    "__type": "InlineCode",
                                    "__tag": 4051,
                                    "value": "overwrite"
                                  }
                                ]
                              },
                              "dd": [
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "This indicates that the original contents of the "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(in)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " argument       may be altered by the Fortran/C function.  F2PY creates an optional       argument "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "overwrite_<argument name>"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " with the default value "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "1"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "."
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "DefList",
                          "__tag": 4033,
                          "children": [
                            {
                              "__type": "DefListItem",
                              "__tag": 4037,
                              "dt": {
                                "__type": "Paragraph",
                                "__tag": 4045,
                                "children": [
                                  {
                                    "__type": "InlineCode",
                                    "__tag": 4051,
                                    "value": "out=<new name>"
                                  }
                                ]
                              },
                              "dd": [
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "Replaces the returned name with "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "<new name>"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " in the "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "__doc__"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " string       of the wrapper function."
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "DefList",
                          "__tag": 4033,
                          "children": [
                            {
                              "__type": "DefListItem",
                              "__tag": 4037,
                              "dt": {
                                "__type": "Paragraph",
                                "__tag": 4045,
                                "children": [
                                  {
                                    "__type": "InlineCode",
                                    "__tag": 4051,
                                    "value": "callback"
                                  }
                                ]
                              },
                              "dd": [
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "Constructs an external function suitable for calling Python functions       from Fortran. "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(callback)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " must be specified before the       corresponding "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "external"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " statement. If the 'argument' is not in       the argument list then it will be added to Python wrapper but only       by initializing an external function."
                                    }
                                  ]
                                },
                                {
                                  "__type": "Admonition",
                                  "__tag": 4056,
                                  "kind": "note",
                                  "base_type": "note",
                                  "children": [
                                    {
                                      "__type": "AdmonitionTitle",
                                      "__tag": 4055,
                                      "children": [
                                        {
                                          "__type": "Text",
                                          "__tag": 4046,
                                          "value": "note "
                                        }
                                      ]
                                    },
                                    {
                                      "__type": "DefList",
                                      "__tag": 4033,
                                      "children": [
                                        {
                                          "__type": "DefListItem",
                                          "__tag": 4037,
                                          "dt": {
                                            "__type": "Paragraph",
                                            "__tag": 4045,
                                            "children": [
                                              {
                                                "__type": "Text",
                                                "__tag": 4046,
                                                "value": "Use "
                                              },
                                              {
                                                "__type": "InlineCode",
                                                "__tag": 4051,
                                                "value": "intent(callback)"
                                              },
                                              {
                                                "__type": "Text",
                                                "__tag": 4046,
                                                "value": " in situations where the Fortran/C code assumes"
                                              }
                                            ]
                                          },
                                          "dd": [
                                            {
                                              "__type": "Paragraph",
                                              "__tag": 4045,
                                              "children": [
                                                {
                                                  "__type": "Text",
                                                  "__tag": 4046,
                                                  "value": "that the user implemented a function with a given prototype and linked       it to an executable. Don't use "
                                                },
                                                {
                                                  "__type": "InlineCode",
                                                  "__tag": 4051,
                                                  "value": "intent(callback)"
                                                },
                                                {
                                                  "__type": "Text",
                                                  "__tag": 4046,
                                                  "value": " if the function       appears in the argument list of a Fortran routine."
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "With "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(hide)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " or "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "optional"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " attributes specified and using a       wrapper function without specifying the callback argument in the argument       list; then the call-back function is assumed to be found in the  namespace       of the F2PY generated extension module where it can be set as a module       attribute by a user."
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "DefList",
                          "__tag": 4033,
                          "children": [
                            {
                              "__type": "DefListItem",
                              "__tag": 4037,
                              "dt": {
                                "__type": "Paragraph",
                                "__tag": 4045,
                                "children": [
                                  {
                                    "__type": "InlineCode",
                                    "__tag": 4051,
                                    "value": "aux"
                                  }
                                ]
                              },
                              "dd": [
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "Defines an auxiliary C variable in the F2PY generated wrapper function.       Useful to save parameter values so that they can be accessed in       initialization expressions for other variables."
                                    }
                                  ]
                                },
                                {
                                  "__type": "Admonition",
                                  "__tag": 4056,
                                  "kind": "note",
                                  "base_type": "note",
                                  "children": [
                                    {
                                      "__type": "AdmonitionTitle",
                                      "__tag": 4055,
                                      "children": [
                                        {
                                          "__type": "Text",
                                          "__tag": 4046,
                                          "value": "note "
                                        }
                                      ]
                                    },
                                    {
                                      "__type": "Paragraph",
                                      "__tag": 4045,
                                      "children": [
                                        {
                                          "__type": "InlineCode",
                                          "__tag": 4051,
                                          "value": "intent(aux)"
                                        },
                                        {
                                          "__type": "Text",
                                          "__tag": 4046,
                                          "value": " silently implies "
                                        },
                                        {
                                          "__type": "InlineCode",
                                          "__tag": 4051,
                                          "value": "intent(c)"
                                        },
                                        {
                                          "__type": "Text",
                                          "__tag": 4046,
                                          "value": "."
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The following rules apply:"
                    }
                  ]
                },
                {
                  "__type": "BulletList",
                  "__tag": 4053,
                  "ordered": false,
                  "start": 1,
                  "children": [
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "If none of "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "intent(in | inout | out | hide)"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": " are specified,     "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "intent(in)"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": " is assumed."
                            }
                          ]
                        },
                        {
                          "__type": "BulletList",
                          "__tag": 4053,
                          "ordered": false,
                          "start": 1,
                          "children": [
                            {
                              "__type": "ListItem",
                              "__tag": 4054,
                              "children": [
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(in,inout)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " is "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(in)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": ";"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "__type": "ListItem",
                              "__tag": 4054,
                              "children": [
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(in,hide)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " or "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(inout,hide)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " is "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(hide)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": ";"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "__type": "ListItem",
                              "__tag": 4054,
                              "children": [
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(out)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " is "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(out,hide)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " unless "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(in)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " or       "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(inout)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " is specified."
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "If "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "intent(copy)"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": " or "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "intent(overwrite)"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": " is used, then an additional     optional argument is introduced with a name "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "overwrite_<argument name>"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "     and a default value 0 or 1, respectively."
                            }
                          ]
                        },
                        {
                          "__type": "BulletList",
                          "__tag": 4053,
                          "ordered": false,
                          "start": 1,
                          "children": [
                            {
                              "__type": "ListItem",
                              "__tag": 4054,
                              "children": [
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(inout,inplace)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " is "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(inplace)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": ";"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "__type": "ListItem",
                              "__tag": 4054,
                              "children": [
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(in,inplace)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " is "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(inplace)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": ";"
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "__type": "ListItem",
                              "__tag": 4054,
                              "children": [
                                {
                                  "__type": "Paragraph",
                                  "__tag": 4045,
                                  "children": [
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "intent(hide)"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " disables "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "optional"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": " and "
                                    },
                                    {
                                      "__type": "InlineCode",
                                      "__tag": 4051,
                                      "value": "required"
                                    },
                                    {
                                      "__type": "Text",
                                      "__tag": 4046,
                                      "value": "."
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "InlineCode",
                    "__tag": 4051,
                    "value": "check([<C-booleanexpr>])"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Performs a consistency check on the arguments by evaluating   "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<C-booleanexpr>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "; if "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<C-booleanexpr>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " returns 0, an exception is raised."
                    }
                  ]
                },
                {
                  "__type": "Admonition",
                  "__tag": 4056,
                  "kind": "note",
                  "base_type": "note",
                  "children": [
                    {
                      "__type": "AdmonitionTitle",
                      "__tag": 4055,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "note "
                        }
                      ]
                    },
                    {
                      "__type": "DefList",
                      "__tag": 4033,
                      "children": [
                        {
                          "__type": "DefListItem",
                          "__tag": 4037,
                          "dt": {
                            "__type": "Paragraph",
                            "__tag": 4045,
                            "children": [
                              {
                                "__type": "Text",
                                "__tag": 4046,
                                "value": "If "
                              },
                              {
                                "__type": "InlineCode",
                                "__tag": 4051,
                                "value": "check(..)"
                              },
                              {
                                "__type": "Text",
                                "__tag": 4046,
                                "value": " is not used then F2PY automatically generates a few"
                              }
                            ]
                          },
                          "dd": [
                            {
                              "__type": "Paragraph",
                              "__tag": 4045,
                              "children": [
                                {
                                  "__type": "Text",
                                  "__tag": 4046,
                                  "value": "standard checks (e.g.  in a case of an array argument, it checks for the   proper shape and size). Use "
                                },
                                {
                                  "__type": "InlineCode",
                                  "__tag": 4051,
                                  "value": "check()"
                                },
                                {
                                  "__type": "Text",
                                  "__tag": 4046,
                                  "value": " to disable checks   generated by F2PY."
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "InlineCode",
                    "__tag": 4051,
                    "value": "depend([<names>])"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "This declares that the corresponding argument depends on the values   of variables in the "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<names>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " list. For example, "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<init_expr>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "   may use the values of other arguments.  Using information given by   "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "depend(..)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " attributes, F2PY ensures that arguments are   initialized in a proper order. If the "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "depend(..)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " attribute is not   used then F2PY determines dependence relations automatically. Use   "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "depend()"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " to disable the dependence relations generated by F2PY."
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "When you edit dependence relations that were initially generated by   F2PY, be careful not to break the dependence relations of other   relevant variables. Another thing to watch out for is cyclic   dependencies. F2PY is able to detect cyclic dependencies   when constructing wrappers and it complains if any are found."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "InlineCode",
                    "__tag": 4051,
                    "value": "allocatable"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The corresponding variable is a Fortran 90 allocatable array defined as   Fortran 90 module data."
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "__type": "Target",
          "__tag": 4061,
          "label": "external"
        },
        {
          "__type": "DefList",
          "__tag": 4033,
          "children": [
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "InlineCode",
                    "__tag": 4051,
                    "value": "external"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The corresponding argument is a function provided by user. The   signature of this call-back function can be defined"
                    }
                  ]
                },
                {
                  "__type": "BulletList",
                  "__tag": 4053,
                  "ordered": false,
                  "start": 1,
                  "children": [
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "in "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "__user__"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": " module block,"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "or by demonstrative (or real, if the signature file is a real Fortran     code) call in the "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "<other statements>"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": " block."
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "For example, F2PY generates from:"
                    }
                  ]
                },
                {
                  "__type": "Code",
                  "__tag": 4050,
                  "value": "external cb_sub, cb_fun\n  integer n\n  real a(n),r\n  call cb_sub(a,n)\n  r = cb_fun(4)",
                  "execution_status": null
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "the following call-back signatures:"
                    }
                  ]
                },
                {
                  "__type": "Code",
                  "__tag": 4050,
                  "value": "subroutine cb_sub(a,n)\n      real dimension(n) :: a\n      integer optional,check(len(a)>=n),depend(a) :: n=len(a)\n  end subroutine cb_sub\n  function cb_fun(e_4_e) result (r)\n      integer :: e_4_e\n      real :: r\n  end function cb_fun",
                  "execution_status": null
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The corresponding user-provided Python function are then:"
                    }
                  ]
                },
                {
                  "__type": "Code",
                  "__tag": 4050,
                  "value": "def cb_sub(a,[n]):\n      ...\n      return\n  def cb_fun(e_4_e):\n      ...\n      return r",
                  "execution_status": null
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "See also the "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "intent(callback)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " attribute."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "InlineCode",
                    "__tag": 4051,
                    "value": "parameter"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "This indicates that the corresponding variable is a parameter and it must have   a fixed value. F2PY replaces all parameter occurrences by their corresponding   values."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Attributes"
        }
      ],
      "level": 2,
      "target": "f2py-attributes"
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Extensions"
        }
      ],
      "level": 2,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The F2PY directives allow using F2PY signature file constructs in Fortran 77/90 source codes. With this feature one  can (almost) completely skip the intermediate signature file generation and apply F2PY directly to Fortran source codes."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "F2PY directives have the following form    "
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": "<comment char>f2py ...",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "where allowed comment characters for fixed and free format Fortran codes are "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "cC*!#"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " and "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "!"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", respectively. Everything that follows "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "<comment char>f2py"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is ignored by a compiler but read by F2PY as a normal non-comment  Fortran line:"
            }
          ]
        },
        {
          "__type": "Admonition",
          "__tag": 4056,
          "kind": "note",
          "base_type": "note",
          "children": [
            {
              "__type": "AdmonitionTitle",
              "__tag": 4055,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "note "
                }
              ]
            },
            {
              "__type": "Paragraph",
              "__tag": 4045,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "When F2PY finds a line with F2PY directive, the directive is first replaced by 5 spaces and then the line is reread."
                }
              ]
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "For fixed format Fortran codes, "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "<comment char>"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " must be at the first column of a file, of course. For free format Fortran codes, the F2PY directives can appear anywhere in a file."
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "F2PY directives"
        }
      ],
      "level": 3,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "C expressions are used in the following parts of signature files:"
            }
          ]
        },
        {
          "__type": "BulletList",
          "__tag": 4053,
          "ordered": false,
          "start": 1,
          "children": [
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<init_expr>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " for variable initialization;"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<C-booleanexpr>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " of the "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "check"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " attribute;"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "<arrayspec>"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " of the "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "dimension"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " attribute;"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "callstatement"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " statement, here also a C multi-line block can be used."
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "A C expression may contain:"
            }
          ]
        },
        {
          "__type": "BulletList",
          "__tag": 4053,
          "ordered": false,
          "start": 1,
          "children": [
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "standard C constructs;"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "functions from "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "math.h"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " and "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "Python.h"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ";"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "variables from the argument list, presumably initialized before   according to given dependence relations;"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "the following CPP macros:"
                    }
                  ]
                },
                {
                  "__type": "DefList",
                  "__tag": 4033,
                  "children": [
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "InlineCode",
                            "__tag": 4051,
                            "value": "f2py_rank(<name>)"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "Returns the rank of an array "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "<name>"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "."
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "InlineCode",
                            "__tag": 4051,
                            "value": "f2py_shape(<name>, <n>)"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "Returns the "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "<n>"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "-th dimension of an array "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "<name>"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "."
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "InlineCode",
                            "__tag": 4051,
                            "value": "f2py_len(<name>)"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "Returns the length of an array "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "<name>"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "."
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "InlineCode",
                            "__tag": 4051,
                            "value": "f2py_size(<name>)"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "Returns the size of an array "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "<name>"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "."
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "InlineCode",
                            "__tag": 4051,
                            "value": "f2py_itemsize(<name>)"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "Returns the itemsize of an array "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "<name>"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "."
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "InlineCode",
                            "__tag": 4051,
                            "value": "f2py_slen(<name>)"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "Returns the length of a string "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "<name>"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "."
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "For initializing an array "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "<array name>"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", F2PY generates a loop over all indices and dimensions that executes the following pseudo-statement    "
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": "<array name>(_i[0],_i[1],...) = <init_expr>;",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "where "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "_i[<i>]"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " refers to the "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "<i>"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "-th index value and that runs from "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "0"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " to "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "shape(<array name>,<i>)-1"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "For example, a function "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "myrange(n)"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " generated from the following signature"
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": "subroutine myrange(a,n)\n  fortranname        ! myrange is a dummy wrapper\n  integer intent(in) :: n\n  real*8 intent(c,out),dimension(n),depend(n) :: a = _i[0]\nend subroutine myrange",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "is equivalent to "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "numpy.arange(n,dtype=float)"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "."
            }
          ]
        },
        {
          "__type": "Admonition",
          "__tag": 4056,
          "kind": "warning",
          "base_type": "warning",
          "children": [
            {
              "__type": "AdmonitionTitle",
              "__tag": 4055,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "warning "
                }
              ]
            },
            {
              "__type": "Paragraph",
              "__tag": 4045,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "F2PY may lower cases also in C expressions when scanning Fortran codes (see "
                },
                {
                  "__type": "InlineCode",
                  "__tag": 4051,
                  "value": "--[no]-lower"
                },
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": " option)."
                }
              ]
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "C expressions"
        }
      ],
      "level": 3,
      "target": "c-expressions"
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "A multi-line block starts with "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "'''"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " (triple single-quotes) and ends with "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "'''"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " in some "
            },
            {
              "__type": "Emphasis",
              "__tag": 4047,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "strictly"
                }
              ]
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " subsequent line.  Multi-line blocks can be used only within .pyf files. The contents of a multi-line block can be arbitrary (except that it cannot contain "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "'''"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ") and no transformations (e.g. lowering cases) are applied to it."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Currently, multi-line blocks can be used in the following constructs:"
            }
          ]
        },
        {
          "__type": "BulletList",
          "__tag": 4053,
          "ordered": false,
          "start": 1,
          "children": [
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "as a C expression of the "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "callstatement"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " statement;"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "as a C type specification of the "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "callprotoargument"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " statement;"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "as a C code block of the "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "usercode"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " statement;"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "as a list of C arrays of the "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "pymethoddef"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " statement;"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "as documentation string."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Multi-line blocks"
        }
      ],
      "level": 3,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "F2PY extends char-selector specification, usable within a signature file or a F2PY directive, as follows    "
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": "<extended-charselector> := <charselector>\n                        | (f2py_len= <len>)",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "See "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "Character Strings",
              "domain": null,
              "role": "ref",
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " for usage."
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Extended char-selector"
        }
      ],
      "level": 2,
      "target": null
    }
  ],
  "local_refs": []
}