ENH: Basic checks on data #2

Description

@dgursoy

Proposed functions for checking content:

contains_nans: Check if data contains NaN elements.
contains_negs: Check if data contains negative elements.
contains_zeros: Check if data contains zeros.
contains_outliers: Check if data has outlier values.

Proposed functions for checking data types:

is_ndarray: Check if an array is a Numpy array.
is_numeric: Check if data is numeric.
is_bool: Check if data is bool.
is_int: Check if data is integer.
is_float: Check if data is float.
is_complex: Check if data is complex.

Proposed functions for checking data shape:

is_square: Check if a 2D array dimensions are the same.
is_shape: Check if a array dimensions are the same as provided shape.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      , 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all \u003cpre\u003e\u003ccode\u003e blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks"); } } catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); } })(); })();
      Skip to content

      ENH: Basic checks on data #2

      Description

      @dgursoy

      Proposed functions for checking content:

      contains_nans: Check if data contains NaN elements.
      contains_negs: Check if data contains negative elements.
      contains_zeros: Check if data contains zeros.
      contains_outliers: Check if data has outlier values.

      Proposed functions for checking data types:

      is_ndarray: Check if an array is a Numpy array.
      is_numeric: Check if data is numeric.
      is_bool: Check if data is bool.
      is_int: Check if data is integer.
      is_float: Check if data is float.
      is_complex: Check if data is complex.

      Proposed functions for checking data shape:

      is_square: Check if a 2D array dimensions are the same.
      is_shape: Check if a array dimensions are the same as provided shape.

      Activity

      Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

      Metadata

      Metadata

      Assignees

      No one assigned

        Type

        No type

        Projects

        No projects

          Relationships

          None yet

          Development

          No branches or pull requests

          Issue actions