-ms_deform_attn_backward(
- const at::Tensor &value,
- const at::Tensor &spatial_shapes,
- const at::Tensor &level_start_index,
- const at::Tensor &sampling_loc,
- const at::Tensor &attn_weight,
- const at::Tensor &grad_output,
- const int im2col_step)
-{
- if (value.type().is_cuda())
- {
-#ifdef WITH_CUDA
- return ms_deform_attn_cuda_backward(
- value, spatial_shapes, level_start_index, sampling_loc, attn_weight, grad_output, im2col_step);
-#else
- AT_ERROR("Not compiled with GPU support");
-#endif
- }
- AT_ERROR("Not implemented on the CPU");
-}
-
-} // namespace groundingdino
\ No newline at end of file
diff --git a/spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pip/_internal/metadata/__init__.py b/spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pip/_internal/metadata/__init__.py
deleted file mode 100644
index 9f73ca7105ff0bf11d74dd16ffb0653059466f70..0000000000000000000000000000000000000000
--- a/spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pip/_internal/metadata/__init__.py
+++ /dev/null
@@ -1,127 +0,0 @@
-import contextlib
-import functools
-import os
-import sys
-from typing import TYPE_CHECKING, List, Optional, Type, cast
-
-from pip._internal.utils.misc import strtobool
-
-from .base import BaseDistribution, BaseEnvironment, FilesystemWheel, MemoryWheel, Wheel
-
-if TYPE_CHECKING:
- from typing import Protocol
-else:
- Protocol = object
-
-__all__ = [
- "BaseDistribution",
- "BaseEnvironment",
- "FilesystemWheel",
- "MemoryWheel",
- "Wheel",
- "get_default_environment",
- "get_environment",
- "get_wheel_distribution",
- "select_backend",
-]
-
-
-def _should_use_importlib_metadata() -> bool:
- """Whether to use the ``importlib.metadata`` or ``pkg_resources`` backend.
-
- By default, pip uses ``importlib.metadata`` on Python 3.11+, and
- ``pkg_resourcess`` otherwise. This can be overridden by a couple of ways:
-
- * If environment variable ``_PIP_USE_IMPORTLIB_METADATA`` is set, it
- dictates whether ``importlib.metadata`` is used, regardless of Python
- version.
- * On Python 3.11+, Python distributors can patch ``importlib.metadata``
- to add a global constant ``_PIP_USE_IMPORTLIB_METADATA = False``. This
- makes pip use ``pkg_resources`` (unless the user set the aforementioned
- environment variable to *True*).
- """
- with contextlib.suppress(KeyError, ValueError):
- return bool(strtobool(os.environ["_PIP_USE_IMPORTLIB_METADATA"]))
- if sys.version_info < (3, 11):
- return False
- import importlib.metadata
-
- return bool(getattr(importlib.metadata, "_PIP_USE_IMPORTLIB_METADATA", True))
-
-
-class Backend(Protocol):
- Distribution: Type[BaseDistribution]
- Environment: Type[BaseEnvironment]
-
-
-@functools.lru_cache(maxsize=None)
-def select_backend() -> Backend:
- if _should_use_importlib_metadata():
- from . import importlib
-
- return cast(Backend, importlib)
- from . import pkg_resources
-
- return cast(Backend, pkg_resources)
-
-
-def get_default_environment() -> BaseEnvironment:
- """Get the default representation for the current environment.
-
- This returns an Environment instance from the chosen backend. The default
- Environment instance should be built from ``sys.path`` and may use caching
- to share instance state accorss calls.
- """
- return select_backend().Environment.default()
-
-
-def get_environment(paths: Optional[List[str]]) -> BaseEnvironment:
- """Get a representation of the environment specified by ``paths``.
-
- This returns an Environment instance from the chosen backend based on the
- given import paths. The backend must build a fresh instance representing
- the state of installed distributions when this function is called.
- """
- return select_backend().Environment.from_paths(paths)
-
-
-def get_directory_distribution(directory: str) -> BaseDistribution:
- """Get the distribution metadata representation in the specified directory.
-
- This returns a Distribution instance from the chosen backend based on
- the given on-disk ``.dist-info`` directory.
- """
- return select_backend().Distribution.from_directory(directory)
-
-
-def get_wheel_distribution(wheel: Wheel, canonical_name: str) -> BaseDistribution:
- """Get the representation of the specified wheel's distribution metadata.
-
- This returns a Distribution instance from the chosen backend based on
- the given wheel's ``.dist-info`` directory.
-
- :param canonical_name: Normalized project name of the given wheel.
- """
- return select_backend().Distribution.from_wheel(wheel, canonical_name)
-
-
-def get_metadata_distribution(
- metadata_contents: bytes,
- filename: str,
- canonical_name: str,
-) -> BaseDistribution:
- """Get the dist representation of the specified METADATA file contents.
-
- This returns a Distribution instance from the chosen backend sourced from the data
- in `metadata_contents`.
-
- :param metadata_contents: Contents of a METADATA file within a dist, or one served
- via PEP 658.
- :param filename: Filename for the dist this metadata represents.
- :param canonical_name: Normalized project name of the given dist.
- """
- return select_backend().Distribution.from_metadata_file_contents(
- metadata_contents,
- filename,
- canonical_name,
- )
diff --git a/spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py b/spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py
deleted file mode 100644
index f1ddb2ebdf9eb702718fd31e09ff92b592da519f..0000000000000000000000000000000000000000
--- a/spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py
+++ /dev/null
@@ -1,188 +0,0 @@
-# SPDX-FileCopyrightText: 2015 Eric Larson
-#
-# SPDX-License-Identifier: Apache-2.0
-
-import hashlib
-import os
-from textwrap import dedent
-
-from ..cache import BaseCache, SeparateBodyBaseCache
-from ..controller import CacheController
-
-try:
- FileNotFoundError
-except NameError:
- # py2.X
- FileNotFoundError = (IOError, OSError)
-
-
-def _secure_open_write(filename, fmode):
- # We only want to write to this file, so open it in write only mode
- flags = os.O_WRONLY
-
- # os.O_CREAT | os.O_EXCL will fail if the file already exists, so we only
- # will open *new* files.
- # We specify this because we want to ensure that the mode we pass is the
- # mode of the file.
- flags |= os.O_CREAT | os.O_EXCL
-
- # Do not follow symlinks to prevent someone from making a symlink that
- # we follow and insecurely open a cache file.
- if hasattr(os, "O_NOFOLLOW"):
- flags |= os.O_NOFOLLOW
-
- # On Windows we'll mark this file as binary
- if hasattr(os, "O_BINARY"):
- flags |= os.O_BINARY
-
- # Before we open our file, we want to delete any existing file that is
- # there
- try:
- os.remove(filename)
- except (IOError, OSError):
- # The file must not exist already, so we can just skip ahead to opening
- pass
-
- # Open our file, the use of os.O_CREAT | os.O_EXCL will ensure that if a
- # race condition happens between the os.remove and this line, that an
- # error will be raised. Because we utilize a lockfile this should only
- # happen if someone is attempting to attack us.
- fd = os.open(filename, flags, fmode)
- try:
- return os.fdopen(fd, "wb")
-
- except:
- # An error occurred wrapping our FD in a file object
- os.close(fd)
- raise
-
-
-class _FileCacheMixin:
- """Shared implementation for both FileCache variants."""
-
- def __init__(
- self,
- directory,
- forever=False,
- filemode=0o0600,
- dirmode=0o0700,
- use_dir_lock=None,
- lock_class=None,
- ):
-
- if use_dir_lock is not None and lock_class is not None:
- raise ValueError("Cannot use use_dir_lock and lock_class together")
-
- try:
- from lockfile import LockFile
- from lockfile.mkdirlockfile import MkdirLockFile
- except ImportError:
- notice = dedent(
- """
- NOTE: In order to use the FileCache you must have
- lockfile installed. You can install it via pip:
- pip install lockfile
- """
- )
- raise ImportError(notice)
-
- else:
- if use_dir_lock:
- lock_class = MkdirLockFile
-
- elif lock_class is None:
- lock_class = LockFile
-
- self.directory = directory
- self.forever = forever
- self.filemode = filemode
- self.dirmode = dirmode
- self.lock_class = lock_class
-
- @staticmethod
- def encode(x):
- return hashlib.sha224(x.encode()).hexdigest()
-
- def _fn(self, name):
- # NOTE: This method should not change as some may depend on it.
- # See: https://github.com/ionrock/cachecontrol/issues/63
- hashed = self.encode(name)
- parts = list(hashed[:5]) + [hashed]
- return os.path.join(self.directory, *parts)
-
- def get(self, key):
- name = self._fn(key)
- try:
- with open(name, "rb") as fh:
- return fh.read()
-
- except FileNotFoundError:
- return None
-
- def set(self, key, value, expires=None):
- name = self._fn(key)
- self._write(name, value)
-
- def _write(self, path, data: bytes):
- """
- Safely write the data to the given path.
- """
- # Make sure the directory exists
- try:
- os.makedirs(os.path.dirname(path), self.dirmode)
- except (IOError, OSError):
- pass
-
- with self.lock_class(path) as lock:
- # Write our actual file
- with _secure_open_write(lock.path, self.filemode) as fh:
- fh.write(data)
-
- def _delete(self, key, suffix):
- name = self._fn(key) + suffix
- if not self.forever:
- try:
- os.remove(name)
- except FileNotFoundError:
- pass
-
-
-class FileCache(_FileCacheMixin, BaseCache):
- """
- Traditional FileCache: body is stored in memory, so not suitable for large
- downloads.
- """
-
- def delete(self, key):
- self._delete(key, "")
-
-
-class SeparateBodyFileCache(_FileCacheMixin, SeparateBodyBaseCache):
- """
- Memory-efficient FileCache: body is stored in a separate file, reducing
- peak memory usage.
- """
-
- def get_body(self, key):
- name = self._fn(key) + ".body"
- try:
- return open(name, "rb")
- except FileNotFoundError:
- return None
-
- def set_body(self, key, body):
- name = self._fn(key) + ".body"
- self._write(name, body)
-
- def delete(self, key):
- self._delete(key, "")
- self._delete(key, ".body")
-
-
-def url_to_file_path(url, filecache):
- """Return the file cache path based on the URL.
-
- This does not ensure the file exists!
- """
- key = CacheController.cache_url(url)
- return filecache._fn(key)
diff --git a/spaces/Bart92/RVC_HF/README.md b/spaces/Bart92/RVC_HF/README.md
deleted file mode 100644
index 9d8914cd05791e4f8db6267eb2a5fe2133e22e58..0000000000000000000000000000000000000000
--- a/spaces/Bart92/RVC_HF/README.md
+++ /dev/null
@@ -1,10 +0,0 @@
----
-title: RVC Inference HF
-emoji: 👀
-colorFrom: green
-colorTo: green
-sdk: gradio
-sdk_version: 3.43.2
-app_file: app.py
-pinned: false
----
\ No newline at end of file
diff --git a/spaces/Benson/text-generation/Examples/Carx Calle Pc Descargar Apk.md b/spaces/Benson/text-generation/Examples/Carx Calle Pc Descargar Apk.md
deleted file mode 100644
index 37589d3653244e51926eddfa086d714dd4158ed6..0000000000000000000000000000000000000000
--- a/spaces/Benson/text-generation/Examples/Carx Calle Pc Descargar Apk.md
+++ /dev/null
@@ -1,71 +0,0 @@
-
-Cómo descargar y jugar CarX Street en PC
- CarX Street es un juego de carreras desarrollado por CarX Technologies, LLC. Es uno de los juegos de carreras callejeras más realistas e inmersivos en dispositivos móviles, con un mundo abierto, un modo carrera, un multijugador en línea y un sistema detallado de personalización y ajuste de coches. Si eres un fan de las carreras de alta velocidad y la deriva, te encantará CarX Street.
-carx calle pc descargar apk Download Zip ✺ https://bltlly.com/2v6Ljl
- ¿Pero qué pasa si quieres jugar CarX Street en una pantalla más grande, con mejores gráficos y controles? Bueno, hay una manera de hacerlo. Puedes descargar y jugar CarX Street en tu PC usando un emulador. Un emulador es un software que le permite ejecutar aplicaciones Android en su ordenador o portátil. En este artículo, te mostraremos cómo descargar y jugar CarX Street en PC usando algunos de los mejores emuladores disponibles.
- Características del juego de CarX Street
- Antes de entrar en los detalles de cómo descargar y jugar CarX Street en PC, echemos un vistazo a algunas de las características del juego que lo hacen tan popular entre los entusiastas de las carreras.
- Carreras de mundo abierto y deriva
- CarX Street le ofrece una gran ciudad y sus alrededores para explorar, desde las concurridas calles de la ciudad hasta las carreteras de montaña en espiral y las fascinantes carreteras costeras. Usted puede conducir a la velocidad máxima o la deriva a través de vueltas, dependiendo de su preferencia. También puedes unirte a clubes, derrotar jefes y demostrar tus habilidades en diversos desafíos y eventos.
- Modo carrera y multijugador en línea
- Si quieres seguir una historia y progresar a través de diferentes niveles de dificultad, puedes jugar el modo carrera en CarX Street. Empezarás con un coche básico y lo actualizarás a medida que avanzas. También comprarás casas para tus coches y reunirás colecciones para cada modo de carrera.
-
- Personalización y ajuste del coche
- Uno de los aspectos más atractivos de CarX Street es el sistema de personalización y ajuste del coche. Puede elegir entre más de 50 vehículos oficiales de los mejores fabricantes de automóviles del mundo, como BMW, Toyota, Nissan, Subaru, Ford, Chevrolet y más. También puede personalizar la apariencia de su automóvil con varias piezas y accesorios, como espejos, faros, luces, faldas, parachoques, llantas y más.
- Pero eso no es todo. También puede ajustar el rendimiento de su coche con varias mejoras y modificaciones. Puede cambiar el motor, la transmisión, el cuerpo, la suspensión, los neumáticos y más. También puede cambiar el motor de su automóvil único. El sistema de ajuste desbloquea toda la física del comportamiento del coche CarX Technology, dándole una experiencia de conducción realista.
-
- Física realista y gráficos
- CarX Street se jacta de tener uno de los motores de física más realistas en los juegos de carreras móviles. El motor simula el comportamiento de los coches en la carretera, dándole una verdadera experiencia de carreras de la vida. Usted puede sentir la emoción de las carreras de alta velocidad a medida que maniobra su coche a través de vueltas apretadas y tejer dentro y fuera del tráfico.
- El juego también tiene gráficos impresionantes que dan vida al mundo con un detalle impresionante. Se pueden ver los reflejos del sol, las sombras de los edificios y el humo de los tubos de escape. También puede disfrutar de los efectos de sonido realistas del motor, los neumáticos y el medio ambiente.
- CarX Street Requisitos del juego
- Ahora que sabe lo que CarX Street tiene para ofrecer, es posible que se pregunte si su PC puede ejecutarlo sin problemas. Bueno, aquí están las especificaciones mínimas y recomendadas para jugar CarX Street en PC usando un emulador:
-
-
- Especificación
- Mínimo
- Recomendado
-
-
- Sistema operativo
- Windows 7/8/10 (64 bits)
- Windows 10 (64 bits)
-
-
- CPU
-
- Procesador Intel o AMD Quad-Core
-
-
- RAM
- 4 GB
- 8 GB o más
-
-
- Tarjeta gráfica
- NVIDIA GeForce GT 730 o equivalente
- NVIDIA GeForce GTX 1050 o equivalente
-
-
- Espacio de almacenamiento
- 5 GB o más
- 10 GB o más
-
-
- Si su PC cumple con estos requisitos, usted debe ser capaz de jugar CarX Street en el PC sin ningún problema importante. Sin embargo, si quieres optimizar tu rendimiento y jugabilidad, aquí hay algunos consejos que puedes seguir:
- - Elige un emulador que sea compatible con CarX Street y que tenga buenas críticas y valoraciones. Algunos de los mejores emuladores para jugar CarX Street en PC son LDPlayer, BlueStacks, NoxPlayer y MEmu. - Actualiza tu emulador a la última versión y asegúrate de que tiene suficientes recursos asignados a él. Puede ajustar la configuración de su emulador para que coincida con las especificaciones y preferencias de su PC. - Descargar CarX Street de una fuente confiable, como Google Play Store o APKPure. Evite descargar de sitios web desconocidos o sospechosos que puedan contener malware o virus. - Instale CarX Street en su emulador y ejecútelo. Es posible que necesites iniciar sesión con tu cuenta de Google o crear una nueva si aún no la tienes. - Configura tus controles de acuerdo a tu gusto. Puede usar su teclado, ratón o gamepad para jugar CarX Street en PC. También puede personalizar la asignación de claves y la sensibilidad de sus controles en la configuración del emulador. - ¡Disfrute jugando CarX Street en PC! Conclusión
-
- Si estás buscando un emocionante e inmersivo juego de carreras callejeras en PC, definitivamente deberías probar CarX Street. ¡No te arrepentirás!
- Preguntas frecuentes
- Aquí están algunas de las preguntas más frecuentes sobre CarX Street en PC:
- ¿Cuáles son los mejores emuladores para jugar CarX Street en PC?
- Los mejores emuladores para jugar CarX Street en PC son LDPlayer, BlueStacks, NoxPlayer y MEmu. Todos son compatibles con CarX Street y tienen buen rendimiento y características.
- ¿Cómo actualizar CarX Street en PC?
- Para actualizar CarX Street en PC, necesita abrir su emulador e ir a Google Play Store o APKPure. Luego, busque CarX Street y haga clic en el botón de actualización si hay uno disponible. Alternativamente, puede descargar la última versión de CarX Street desde APKPure e instalarla manualmente en su emulador.
- ¿Cómo obtener monedas y gemas gratis en CarX Street?
- Para obtener monedas y gemas gratis en CarX Street, puedes hacer lo siguiente:
- - Completar misiones y logros en el modo carrera - Participar en eventos y desafíos en el modo multijugador en línea - Ver anuncios y videos en el juego - Utilizar códigos promocionales y cupones de fuentes oficiales - Unirse a clubes y clanes y obtener recompensas y bonos de ellos - Compra monedas y gemas con dinero real en la tienda del juego ¿Cómo desbloquear nuevos coches y piezas en CarX Street?
- Para desbloquear nuevos coches y piezas en CarX Street, puede hacer lo siguiente:
- - Avanzar en el modo carrera y derrotar a los jefes - Ganar carreras y eventos en el modo multijugador en línea - Recoger planos y materiales de cajas y cajas - Cambiar monedas y gemas por coches y piezas en eltienda de juegos - Utilice códigos promocionales y cupones de fuentes oficiales Cómo ponerse en contacto con el servicio de asistencia de CarX Technologies?
- Si tiene algún problema o pregunta sobre CarX Street, puede ponerse en contacto con el servicio de soporte de CarX Technologies haciendo lo siguiente:
64aa2da5cf
-
-
\ No newline at end of file
diff --git a/spaces/Benson/text-generation/Examples/Cmo Descargar Carx Street Hack.md b/spaces/Benson/text-generation/Examples/Cmo Descargar Carx Street Hack.md
deleted file mode 100644
index 4d439240b1a3d6a8320d9529e40a781e261fe60a..0000000000000000000000000000000000000000
--- a/spaces/Benson/text-generation/Examples/Cmo Descargar Carx Street Hack.md
+++ /dev/null
@@ -1,48 +0,0 @@
-
-Cómo descargar CarX Street Hack y disfrutar de dinero ilimitado y coches
-CarX Street es un juego de carreras dinámico y abierto que te permite sentirte como un corredor callejero libre. Puedes personalizar tu coche, desafiar a otros jugadores y explorar la ciudad de Sunset. Pero lo que si quieres tener más diversión y obtener acceso a todas las características del juego sin gastar dinero real? Ahí es donde CarX Street Hack entra en juego.
-¿Qué es CarX Street Hack?
-CarX Street Hack es una versión modificada del juego original de CarX Street que le da dinero ilimitado, todos los coches desbloqueados, sin anuncios y protección contra la prohibición. Con este hack, se puede disfrutar del juego sin limitaciones o restricciones. Usted puede comprar cualquier coche que desee, actualizarlo al máximo, y la carrera contra cualquier persona sin preocuparse de conseguir prohibido.
-cómo descargar carx street hack Download Zip ····· https://bltlly.com/2v6IZF
-Características de CarX Street Hack
-Dinero ilimitado
-Una de las principales características de CarX Street Hack es que le da dinero ilimitado. El dinero se utiliza en el juego para comprar coches nuevos, actualizarlos y personalizarlos. Con dinero ilimitado, usted puede comprar cualquier coche que te gusta, de los coches deportivos a los coches del músculo, y hacerlos mirada impresionante. También puede actualizar el motor de su automóvil, la suspensión, los frenos, los neumáticos y más para mejorar su rendimiento y manejo.
-Todos los coches desbloqueados
-Otra característica de CarX Street Hack es que desbloquea todos los coches en el juego. Hay más de 50 coches en CarX Street, cada uno con su propio diseño y características únicas. Algunos de ellos están bloqueados detrás de los niveles o logros, lo que significa que tienes que jugar durante mucho tiempo para desbloquearlos. Pero con CarX Street Hack, puede obtener acceso a todos los coches de inmediato. Puede elegir cualquier coche que desee y cambiar entre ellos en cualquier momento.
-No hay anuncios
-
-Protección anti-van
-Uno de los riesgos de usar un hack es que puede ser prohibido por los desarrolladores de juegos. Es por eso que CarX Street Hack tiene una función de protección anti-prohibición que evita que su cuenta sea detectada o suspendida. Puede jugar CarX Street Hack de forma segura y sin preocuparse por perder su progreso o datos.
-Cómo descargar e instalar CarX Street Hack en su dispositivo
-Ahora que sabe lo que es CarX Street Hack y lo que puede hacer por usted, es posible que se pregunte cómo descargar e instalar en su dispositivo. El proceso es diferente dependiendo de si tienes un dispositivo iOS o Android. Estos son los pasos para cada uno:
-Para dispositivos iOS
-Paso 1: Registrarse para BuildStore
-El primer paso es registrarse en BuildStore, que es una tienda de aplicaciones de terceros que le permite instalar aplicaciones modificadas en su dispositivo iOS sin jailbreak. Puede registrarse en BuildStore visitando [BuildStore]( 1 ) y eligiendo un plan de suscripción. La suscripción cuesta $19.99 por año y te da acceso a cientos de aplicaciones y juegos.
-Paso 2: Búsqueda de CarX Street Hack
-El siguiente paso es buscar CarX Street Hack en BuildStore. Puede hacer esto abriendo la aplicación BuildStore en su dispositivo y escribiendo "CarX Street Hack" en la barra de búsqueda. Usted debe ver el icono de la aplicación y un verde "Instalar" botón al lado.
-Paso 3: Instalar la aplicación
-El paso final es instalar la aplicación en su dispositivo. Puede hacer esto pulsando en el botón "Instalar" y siguiendo las instrucciones en la pantalla. Es posible que tenga que confiar en el desarrollador de aplicaciones en la configuración del dispositivo antes de iniciar la aplicación. Una vez que la aplicación está instalada, se puede abrir y disfrutar de CarX Street Hack.
-
-Para dispositivos Android
-Paso 1: Habilitar fuentes desconocidas
-
-Paso 2: Descargar el archivo APK
-El siguiente paso es descargar el archivo APK de CarX Street Hack. Puede hacer esto visitando [CarX Street Hack] y tocando el botón "Descargar APK". El archivo se descargará en el almacenamiento del dispositivo.
-Paso 3: Instalar la aplicación
-El paso final es instalar la aplicación en su dispositivo. Puede hacer esto localizando el archivo APK en el almacenamiento del dispositivo y tocando en él. Es posible que tenga que conceder algunos permisos a la aplicación antes de instalarla. Una vez instalada, puede abrirla y disfrutar de CarX Street Hack.
- Conclusión
-CarX Street Hack es una gran manera de tener más diversión y emoción en CarX Street, un juego de carreras realista e inmersivo. Con CarX Street Hack, puede obtener dinero ilimitado, todos los coches desbloqueados, sin anuncios, y la protección anti-van. Puede descargar e instalar CarX Street Hack en su dispositivo iOS o Android siguiendo los sencillos pasos anteriores. Entonces, ¿qué estás esperando? Descargar CarX Street Hack hoy y dar rienda suelta a su corredor de la calle interior!
- Preguntas frecuentes
-Aquí hay algunas preguntas frecuentes sobre CarX Street Hack:
-Q: Es CarX Street Hack seguro de usar?
-A: Sí, CarX Street Hack es seguro de usar siempre y cuando lo descargue de una fuente de confianza y siga las instrucciones cuidadosamente. CarX Street Hack tiene una función de protección anti-prohibición que evita que su cuenta sea detectada o suspendida por los desarrolladores del juego.
-Q: ¿Necesito raíz o jailbreak mi dispositivo para utilizar CarX Street Hack?
-A: No, usted no necesita raíz o jailbreak su dispositivo para utilizar CarX Street Hack. Para dispositivos iOS, solo necesita registrarse en BuildStore, que es una tienda de aplicaciones de terceros que le permite instalar aplicaciones modificadas sin jailbreak. Para dispositivos Android, solo necesitas habilitar fuentes desconocidas y descargar el archivo APK.
-Q: ¿CarX Street Hack afectará mi progreso del juego o los datos?
-
-Q: ¿Puedo jugar CarX Street Hack en línea con otros jugadores?
-A: Sí, usted puede jugar CarX Street Hack en línea con otros jugadores. Puede unirse o crear carreras con otros jugadores de todo el mundo y competir por la gloria y las recompensas. También puedes chatear con otros jugadores y hacer amigos.
-Q: ¿Cómo puedo actualizar CarX Street Hack?
-A: Puede actualizar CarX Street Hack visitando la misma fuente donde lo descargó y buscando nuevas versiones. También puede seguirnos en nuestros canales de medios sociales para actualizaciones y noticias sobre CarX Street Hack.
64aa2da5cf
-
-
\ No newline at end of file
diff --git a/spaces/Benson/text-generation/Examples/Cmo Descargar Google Play Store.md b/spaces/Benson/text-generation/Examples/Cmo Descargar Google Play Store.md
deleted file mode 100644
index 7f8301e1476be6867c1837420dac02f9e098fde4..0000000000000000000000000000000000000000
--- a/spaces/Benson/text-generation/Examples/Cmo Descargar Google Play Store.md
+++ /dev/null
@@ -1,76 +0,0 @@
-
-Cómo descargar Google Play Store en tu tablet
-Si tiene una tableta que se ejecuta en Fire OS, como una tableta Amazon Fire, es posible que se pregunte cómo descargar Google Play Store en su dispositivo. Google Play Store es la tienda oficial de aplicaciones para dispositivos Android, donde puedes encontrar millones de aplicaciones y juegos, así como servicios y aplicaciones de Google. En este artículo, le mostraremos por qué es posible que desee instalar Google Play Store en su tableta, lo que necesita saber antes de instalarlo, y cómo instalarlo paso a paso. También proporcionaremos algunos consejos de solución de problemas para instalar Google Play Store en su tableta.
- Por qué es posible que desee instalar Google Play Store en su tableta
-Hay varias razones por las que es posible que desee instalar Google Play Store en su tableta. Estos son algunos de ellos:
-cómo descargar google play store Download ✔✔✔ https://bltlly.com/2v6MlW
- Acceder a más aplicaciones y juegos
-Una de las principales razones por las que es posible que desee instalar Google Play Store en su tableta es acceder a más aplicaciones y juegos que no están disponibles en la Appstore de Amazon. Amazon Appstore tiene una selección limitada de aplicaciones y juegos, y algunos de ellos son obsoletos o incompatibles con su dispositivo. Al instalar Google Play Store en tu tableta, puedes disfrutar de una gama más amplia de aplicaciones y juegos que se actualizan regularmente y se optimizan para tu dispositivo.
- Usar los servicios y aplicaciones de Google
-Otra razón por la que podría querer instalar Google Play Store en su tableta es utilizar los servicios y aplicaciones de Google que no están incluidos en Fire OS. Por ejemplo, si quieres usar Gmail, Chrome, Google Maps, YouTube u otras aplicaciones populares de Google en tu tableta, primero tendrás que instalar Google Play Store. Estas aplicaciones pueden mejorar su experiencia de tableta y proporcionar características útiles que no están disponibles en el Amazon Appstore.
- Personaliza tu experiencia de tableta
-
- Lo que necesita saber antes de instalar Google Play Store en su tableta
-Antes de instalar Google Play Store en tu tablet, hay algunas cosas que necesitas saber y hacer. Estas son algunas de ellas:
- Compruebe su modelo de tableta y la versión del sistema operativo
-Lo primero que debe hacer antes de instalar Google Play Store en su tableta es comprobar el modelo de tableta y la versión del sistema operativo. Esto es importante porque el proceso de instalación puede variar dependiendo de estos factores. Para comprobar el modelo de tableta y la versión del sistema operativo, vaya a Configuración > Opciones de dispositivo > Acerca de Fire Tablet. Verá el nombre del modelo de dispositivo y la versión de Fire OS allí.
- Habilitar aplicaciones de fuentes desconocidas
-Lo siguiente que debe hacer antes de instalar Google Play Store en su tableta es habilitar aplicaciones de fuentes desconocidas. Esto es necesario porque va a descargar e instalar archivos APK desde fuera de la Appstore de Amazon. Para habilitar aplicaciones de fuentes desconocidas, ve a Configuración > Seguridad y privacidad > Aplicaciones de fuentes desconocidas. Activa la opción para Silk Browser y cualquier otro navegador que utilices para descargar los archivos APK.
- Retire su tarjeta SD (opcional)
-Lo último que debe hacer antes de instalar Google Play Store en su tableta es quitar la tarjeta SD si tiene uno. Esto es opcional, pero puede prevenir algunos problemas potenciales durante el proceso de instalación. Para quitar la tarjeta SD, vaya a Configuración > Almacenamiento > Quitar la tarjeta SD de forma segura. Luego, saque la tarjeta SD de su tableta. Puede volver a ponerlo después de terminar de instalar Google Play Store.
- Cómo instalar Google Play Store en su tableta paso a paso
-Ahora que ha preparado su tableta para instalar Google Play Store, puede seguir estos pasos para instalarlo:
- Descargar los archivos APK necesarios
-
- Para descargar los archivos APK, abra su navegador y vaya a los enlaces de abajo. Toque en el botón de descarga y espere a que el archivo se descargue. Repita esto para cada archivo.
-
-
-
-Archivo APK
-Enlace de descarga
-
-
-Administrador de cuentas de Google
-
-
-
-Servicios de Google Play
-
-
-
- Instalar los archivos APK en orden
-El segundo paso para instalar Google Play Store en su tableta es instalar los archivos APK en orden. Esto es importante porque cada archivo depende del anterior. Para instalar los archivos APK, abra su aplicación de administrador de archivos y vaya a la carpeta Descargas. Pulse en cada archivo y siga las instrucciones para instalarlo. Es posible que necesite conceder algunos permisos o ignorar algunas advertencias durante el proceso de instalación. Asegúrate de instalar los archivos en este orden: Google Account Manager, Google Services Framework, Google Play Services y Google Play Store.
- Reinicie su tableta e inicie sesión en Google Play Store
-El paso final para instalar Google Play Store en su tableta es reiniciar su tableta e iniciar sesión en Google Play Store. Esto es necesario para activar los servicios y aplicaciones de Google en su dispositivo. Para reiniciar su tableta, mantenga pulsado el botón de encendido y toque en Reiniciar. Espere a que su tableta se reinicie y luego deslice hacia abajo desde la parte superior de la pantalla. Deberías ver una notificación que dice "Google Play Services no se ejecutará a menos que actualices Google Play Services". Toca esta notificación y luego toca Actualizar. Espera a que termine la actualización y luego abre Google Play Store. Se le pedirá que inicie sesión con su cuenta de Google o cree una nueva si no tiene una. Después de iniciar sesión, puede comenzar a usar Google Play Store en su tableta.
-
-Si encuentra algún problema al instalar o usar Google Play Store en su tableta, aquí hay algunos consejos para solucionar problemas que podrían ayudar:
- Actualizar la versión del sistema operativo Fire
-Si tiene una versión antigua de Fire OS, es posible que tenga que actualizarlo antes de instalar Google Play Store en su tableta. La actualización de su versión de Fire OS puede solucionar algunos problemas de compatibilidad y mejorar el rendimiento de su dispositivo. Para actualizar la versión de Fire OS, vaya a Configuración > Opciones de dispositivo > Actualizaciones del sistema. Toque en Comprobar ahora y luego toque en Actualizar si hay una nueva versión disponible. Espere a que termine la actualización y luego intente instalar Google Play Store de nuevo.
- Borrar caché y datos de Google Apps
-Borrar caché y datos de Google Apps
-Si tiene problemas para iniciar sesión en Google Play Store o el uso de aplicaciones de Google en su tableta, es posible que tenga que borrar la caché y los datos de estas aplicaciones. Limpiar la caché y los datos puede corregir algunos errores y fallas que pueden ocurrir debido a archivos dañados o desactualizados. Para borrar la caché y los datos de las aplicaciones de Google, ve a Configuración > Aplicaciones y notificaciones > Administrar todas las aplicaciones. Toque en cada aplicación de Google y luego toque en Almacenamiento. Toque en Borrar caché y luego toque en Borrar datos. Repita esto para cada aplicación de Google y luego intente usarlas de nuevo.
- Desinstalar y reinstalar Google Play Store
-Si ninguno de los consejos anteriores funciona, es posible que tenga que desinstalar y reinstalar Google Play Store en su tableta. Desinstalar y reinstalar Google Play Store puede restablecer sus ajustes y solucionar algunos problemas que pueden impedir que funcione correctamente. Para desinstalar Google Play Store, ve a Configuración > Aplicaciones y notificaciones > Administrar todas las aplicaciones. Toca en Google Play Store y luego toca en Desinstalar. Espere a que termine la desinstalación y luego descargue e instale Google Play Store nuevamente siguiendo los pasos anteriores.
- Conclusión
-
- Preguntas frecuentes
-Aquí hay algunas preguntas frecuentes sobre la descarga de Google Play Store en su tableta:
- ¿Es seguro instalar Google Play Store en mi tableta?
-Sí, es seguro instalar Google Play Store en su tableta, siempre y cuando descargue los archivos APK de una fuente de confianza, como APKMirror. También debe escanear los archivos APK con una aplicación de seguridad antes de instalarlos para asegurarse de que están libres de malware o virus.
- ¿La instalación de Google Play Store anulará mi garantía o afectará mis servicios de Amazon?
-No, instalar Google Play Store no anulará su garantía ni afectará a sus servicios de Amazon. Todavía puede utilizar su cuenta de Amazon, membresía Prime, Alexa, Kindle, Audible, y otros servicios de Amazon en su tableta después de instalar Google Play Store.
- ¿Puedo desinstalar Google Play Store si no me gusta o quiero volver a la configuración original?
-Sí, puedes desinstalar Google Play Store si no te gusta o quieres volver a la configuración original. Para desinstalar Google Play Store, siga los mismos pasos anteriores pero en orden inverso. Primero, desinstala Google Play Store, luego Google Play Services, luego Google Services Framework y luego Google Account Manager. También puede desactivar las aplicaciones de fuentes desconocidas e insertar la tarjeta SD de nuevo si se elimina.
- ¿Cómo puedo actualizar las aplicaciones de Google Play Store y Google en mi tableta?
-Puede actualizar Google Play Store y las aplicaciones de Google en su tableta abriendo Google Play Store y tocando el icono del menú en la esquina superior izquierda. Luego, toca Mis aplicaciones y juegos y luego toca Actualizar todo. También puede comprobar las actualizaciones manualmente tocando en cada aplicación y luego tocando en Actualizar si hay una nueva versión disponible.
- ¿Cuáles son algunas de las mejores aplicaciones y juegos que puedo descargar de Google Play Store en mi tableta? 64aa2da5cf
-
-
\ No newline at end of file
diff --git a/spaces/Benson/text-generation/Examples/Como Hacer Un Disco Duro.md b/spaces/Benson/text-generation/Examples/Como Hacer Un Disco Duro.md
deleted file mode 100644
index 10c093eec13b7e6a0e7f08eceaa5e56053ed5e0f..0000000000000000000000000000000000000000
--- a/spaces/Benson/text-generation/Examples/Como Hacer Un Disco Duro.md
+++ /dev/null
@@ -1,56 +0,0 @@
-
-Windows 10 USB DVD Herramienta de descarga: ¿Qué es y cómo usarlo
-Introducción
-Si desea instalar Windows 10 en su computadora, tiene dos opciones: puede actualizar desde un sistema operativo existente o puede crear un medio de arranque (como una unidad flash USB o un DVD) e instalarlo desde cero. En este artículo, nos centraremos en la segunda opción y le mostraremos cómo usar la herramienta de descarga de DVD USB de Windows 10 para crear su propio medio de instalación.
-como hacer un disco duro Download Zip ✅ https://bltlly.com/2v6JtQ
-¿Qué es la herramienta de descarga de DVD USB de Windows 10?
-Windows 10 USB DVD Download Tool es un software gratuito que te permite crear un medio de arranque desde un archivo ISO. Un archivo ISO es un único archivo que contiene todos los archivos de instalación de Windows en un formato comprimido. Puede descargar un archivo ISO desde el sitio web de Microsoft o desde otras fuentes. La herramienta luego copiará el archivo ISO a su medio elegido y lo hará arrancable, para que pueda instalar Windows 10 en su computadora sin tener que ejecutar un sistema operativo existente.
-¿Por qué necesita la herramienta de descarga de DVD USB de Windows 10?
-Es posible que necesite Windows 10 USB DVD Download Tool por varias razones, tales como:
-
- Desea realizar una instalación limpia de Windows 10, lo que significa eliminar todos sus datos y configuraciones anteriores y comenzar de nuevo.
- Desea instalar Windows 10 en un equipo diferente al que está utilizando actualmente.
- Desea tener una copia de seguridad de Windows 10 en caso de que algo vaya mal con su computadora o su sistema operativo.
- Desea probar Windows 10 antes de comprometerse con él.
-
-En cualquiera de estos casos, tener un medio de arranque le permitirá instalar Windows 10 fácil y rápidamente.
-Cómo descargar la herramienta de descarga de Windows 10 USB DVD
-Para descargar Windows 10 USB DVD Download Tool, siga estos pasos:
-
-Paso 1: Ir al sitio web de Microsoft
-
-Paso 2: Haga clic en el botón de descarga
-Un archivo llamado "MediaCreationTool.exe" comenzará a descargarse. Guárdelo en su ubicación preferida en su computadora. Este archivo tiene un tamaño de unos 18 MB y debería tardar solo unos minutos en descargarse.
-Paso 3: Ejecute el archivo de configuración
-Una vez completada la descarga, haga doble clic en el archivo para ejecutarlo. Puede ver un aviso de Control de cuentas de usuario pidiendo permiso para realizar cambios en su dispositivo. Haga clic en "Sí" para continuar. La herramienta abrirá y le mostrará algunos términos de licencia. Léalos cuidadosamente y haga clic en "Aceptar" si está de acuerdo con ellos.
-Cómo usar la herramienta de descarga de DVD USB de Windows 10
-Para usar la herramienta de descarga de DVD USB de Windows 10, siga estos pasos:
-Paso 1: Inserte una unidad flash USB o un DVD
-Necesitará una unidad flash USB con al menos 8 GB de espacio o un DVD en blanco. Insértelo en el puerto o unidad de su computadora. Asegúrese de que ha realizado una copia de seguridad de los datos importantes en los medios, ya que se borrará durante el proceso.
-Paso 2: Inicie la herramienta y busque el archivo ISO
-Vuelve a la herramienta y haz clic en "Siguiente". La herramienta te preguntará qué quieres hacer. Elija la opción "Crear medios de instalación (unidad flash USB, DVD o archivo ISO) para otro PC" y haga clic en "Siguiente". La herramienta le pedirá que seleccione el idioma, la edición y la arquitectura de Windows 10 que desea instalar. Puede utilizar las opciones recomendadas en función de su PC actual, o puede cambiarlas según sus preferencias. Haga clic en "Siguiente" cuando haya terminado. La herramienta le pedirá que elija qué medio usar. Seleccione "archivo ISO" y haga clic en "Siguiente". La herramienta le pedirá que busque la ubicación donde desea guardar el archivo ISO. Elija una carpeta en su computadora y haga clic en "Guardar". La herramienta comenzará a descargar el archivo ISO de Windows 10, que es de aproximadamente 4 GB de tamaño y puede tomar algún tiempo dependiendo de su velocidad de Internet.
-
-Una vez completada la descarga, la herramienta le pedirá que elija un tipo de medio. Seleccione "unidad flash USB" o "DVD" dependiendo de lo que haya insertado en el paso 1. La herramienta le mostrará una lista de unidades disponibles. Seleccione el que corresponda a su medio y haga clic en "Siguiente". La herramienta le advertirá que todo lo que esté en la unidad se eliminará. Haga clic en "OK" para confirmar. La herramienta comenzará a copiar el archivo ISO a su medio y lo hará arrancable. Esto también puede tomar algún tiempo dependiendo de la velocidad de sus medios. Cuando termine el proceso, la herramienta le mostrará un mensaje diciendo que su medio de arranque está listo. Haga clic en "Finalizar" para cerrar la herramienta.
-Conclusión
-Ha creado con éxito un medio de arranque utilizando Windows 10 USB DVD Download Tool. Ahora puede usarlo para instalar Windows 10 en su computadora u otro PC. Para ello, debe cambiar el orden de arranque en la configuración del BIOS y seleccionar el medio como primer dispositivo de arranque. Luego, siga las instrucciones en la pantalla para completar la instalación.
-Resumen de los puntos principales
-En este artículo, hemos explicado lo que es Windows 10 USB DVD Download Tool y por qué puede necesitarlo. También le hemos mostrado cómo descargarlo y usarlo para crear un medio de arranque desde un archivo ISO. Esperamos que este artículo haya sido útil e informativo para usted.
-Llamada a la acción y retroalimentación
-Si tiene alguna pregunta o comentario sobre Windows 10 USB DVD Download Tool o este artículo, no dude en dejarlos a continuación. Nos encantaría saber de ti y ayudarte. Además, si te gustó este artículo, por favor compártelo con tus amigos y familiares que puedan encontrarlo útil. ¡Gracias por leer!
- Preguntas frecuentes
-Q: ¿Cuál es la diferencia entre un archivo ISO y un medio de arranque?
-
-Q: ¿Dónde puedo descargar un archivo ISO para Windows 10?
-A: Puede descargar un archivo ISO para Windows 10 desde la página de descarga software en el sitio web de Microsoft o desde otras fuentes. Sin embargo, asegúrese de descargar un archivo ISO genuino y verificado de una fuente confiable, ya que algunos archivos ISO pueden contener virus o malware.
-Q: ¿Puedo usar la herramienta de descarga de DVD USB de Windows 10 para otras versiones de Windows?
-A: No, Windows 10 USB DVD Download Tool está diseñado específicamente para Windows 10. Si desea crear un medio de arranque para otras versiones de Windows, como Windows 7 o Windows 8.1, debe usar diferentes herramientas, como Windows USB/DVD Download Tool o Rufus .
-Q: ¿Puedo utilizar la herramienta de descarga de DVD USB de Windows 10 para otros fines que instalar Windows?
-A: Sí, puede usar la herramienta de descarga de DVD USB de Windows 10 para fines distintos de instalar Windows, como reparar o restaurar su sistema, acceder a opciones avanzadas o solucionar problemas. Para hacerlo, debe arrancar desde su medio y seleccionar la opción "Reparar su computadora" en la primera pantalla. Luego, puede elegir entre varias opciones, como "Reparación de inicio", "Restaurar sistema", "Recuperación de imagen del sistema", "Símbolo del sistema" o "Volver a la versión anterior".
-Q: ¿Cómo puedo eliminar el archivo ISO y los medios de arranque después de instalar Windows?
-A: Si desea eliminar el archivo ISO y los medios de arranque después de instalar Windows, puede hacerlo siguiendo estos pasos:
-
-Para eliminar el archivo ISO, simplemente busque en su computadora y bórrelo como cualquier otro archivo. También puede usar una herramienta de limpieza de discos para eliminar cualquier archivo temporal que se haya creado durante la descarga.
-
- 64aa2da5cf
-
-
\ No newline at end of file
diff --git a/spaces/BetterAPI/BetterChat_new/src/lib/switchTheme.ts b/spaces/BetterAPI/BetterChat_new/src/lib/switchTheme.ts
deleted file mode 100644
index 9da30b244c4b20b4585b34a02617895a3499a56f..0000000000000000000000000000000000000000
--- a/spaces/BetterAPI/BetterChat_new/src/lib/switchTheme.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-export function switchTheme() {
- const { classList } = document.querySelector("html") as HTMLElement;
- if (classList.contains("dark")) {
- classList.remove("dark");
- localStorage.theme = "light";
- } else {
- classList.add("dark");
- localStorage.theme = "dark";
- }
-}
diff --git a/spaces/Big-Web/MMSD/env/Lib/site-packages/pip/_internal/models/installation_report.py b/spaces/Big-Web/MMSD/env/Lib/site-packages/pip/_internal/models/installation_report.py
deleted file mode 100644
index fef3757f222b67fc1f4de52d260c49d64b6a4e16..0000000000000000000000000000000000000000
--- a/spaces/Big-Web/MMSD/env/Lib/site-packages/pip/_internal/models/installation_report.py
+++ /dev/null
@@ -1,53 +0,0 @@
-from typing import Any, Dict, Sequence
-
-from pip._vendor.packaging.markers import default_environment
-
-from pip import __version__
-from pip._internal.req.req_install import InstallRequirement
-
-
-class InstallationReport:
- def __init__(self, install_requirements: Sequence[InstallRequirement]):
- self._install_requirements = install_requirements
-
- @classmethod
- def _install_req_to_dict(cls, ireq: InstallRequirement) -> Dict[str, Any]:
- assert ireq.download_info, f"No download_info for {ireq}"
- res = {
- # PEP 610 json for the download URL. download_info.archive_info.hashes may
- # be absent when the requirement was installed from the wheel cache
- # and the cache entry was populated by an older pip version that did not
- # record origin.json.
- "download_info": ireq.download_info.to_dict(),
- # is_direct is true if the requirement was a direct URL reference (which
- # includes editable requirements), and false if the requirement was
- # downloaded from a PEP 503 index or --find-links.
- "is_direct": bool(ireq.original_link),
- # requested is true if the requirement was specified by the user (aka
- # top level requirement), and false if it was installed as a dependency of a
- # requirement. https://peps.python.org/pep-0376/#requested
- "requested": ireq.user_supplied,
- # PEP 566 json encoding for metadata
- # https://www.python.org/dev/peps/pep-0566/#json-compatible-metadata
- "metadata": ireq.get_dist().metadata_dict,
- }
- if ireq.user_supplied and ireq.extras:
- # For top level requirements, the list of requested extras, if any.
- res["requested_extras"] = list(sorted(ireq.extras))
- return res
-
- def to_dict(self) -> Dict[str, Any]:
- return {
- "version": "1",
- "pip_version": __version__,
- "install": [
- self._install_req_to_dict(ireq) for ireq in self._install_requirements
- ],
- # https://peps.python.org/pep-0508/#environment-markers
- # TODO: currently, the resolver uses the default environment to evaluate
- # environment markers, so that is what we report here. In the future, it
- # should also take into account options such as --python-version or
- # --platform, perhaps under the form of an environment_override field?
- # https://github.com/pypa/pip/issues/11198
- "environment": default_environment(),
- }
diff --git a/spaces/Big-Web/MMSD/env/Lib/site-packages/pip/_vendor/pygments/formatters/groff.py b/spaces/Big-Web/MMSD/env/Lib/site-packages/pip/_vendor/pygments/formatters/groff.py
deleted file mode 100644
index f3dcbce9b9fa2904fc361ef09139aeec3568685e..0000000000000000000000000000000000000000
--- a/spaces/Big-Web/MMSD/env/Lib/site-packages/pip/_vendor/pygments/formatters/groff.py
+++ /dev/null
@@ -1,170 +0,0 @@
-"""
- pygments.formatters.groff
- ~~~~~~~~~~~~~~~~~~~~~~~~~
-
- Formatter for groff output.
-
- :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
-
-import math
-from pip._vendor.pygments.formatter import Formatter
-from pip._vendor.pygments.util import get_bool_opt, get_int_opt
-
-__all__ = ['GroffFormatter']
-
-
-class GroffFormatter(Formatter):
- """
- Format tokens with groff escapes to change their color and font style.
-
- .. versionadded:: 2.11
-
- Additional options accepted:
-
- `style`
- The style to use, can be a string or a Style subclass (default:
- ``'default'``).
-
- `monospaced`
- If set to true, monospace font will be used (default: ``true``).
-
- `linenos`
- If set to true, print the line numbers (default: ``false``).
-
- `wrap`
- Wrap lines to the specified number of characters. Disabled if set to 0
- (default: ``0``).
- """
-
- name = 'groff'
- aliases = ['groff','troff','roff']
- filenames = []
-
- def __init__(self, **options):
- Formatter.__init__(self, **options)
-
- self.monospaced = get_bool_opt(options, 'monospaced', True)
- self.linenos = get_bool_opt(options, 'linenos', False)
- self._lineno = 0
- self.wrap = get_int_opt(options, 'wrap', 0)
- self._linelen = 0
-
- self.styles = {}
- self._make_styles()
-
-
- def _make_styles(self):
- regular = '\\f[CR]' if self.monospaced else '\\f[R]'
- bold = '\\f[CB]' if self.monospaced else '\\f[B]'
- italic = '\\f[CI]' if self.monospaced else '\\f[I]'
-
- for ttype, ndef in self.style:
- start = end = ''
- if ndef['color']:
- start += '\\m[%s]' % ndef['color']
- end = '\\m[]' + end
- if ndef['bold']:
- start += bold
- end = regular + end
- if ndef['italic']:
- start += italic
- end = regular + end
- if ndef['bgcolor']:
- start += '\\M[%s]' % ndef['bgcolor']
- end = '\\M[]' + end
-
- self.styles[ttype] = start, end
-
-
- def _define_colors(self, outfile):
- colors = set()
- for _, ndef in self.style:
- if ndef['color'] is not None:
- colors.add(ndef['color'])
-
- for color in colors:
- outfile.write('.defcolor ' + color + ' rgb #' + color + '\n')
-
-
- def _write_lineno(self, outfile):
- self._lineno += 1
- outfile.write("%s% 4d " % (self._lineno != 1 and '\n' or '', self._lineno))
-
-
- def _wrap_line(self, line):
- length = len(line.rstrip('\n'))
- space = ' ' if self.linenos else ''
- newline = ''
-
- if length > self.wrap:
- for i in range(0, math.floor(length / self.wrap)):
- chunk = line[i*self.wrap:i*self.wrap+self.wrap]
- newline += (chunk + '\n' + space)
- remainder = length % self.wrap
- if remainder > 0:
- newline += line[-remainder-1:]
- self._linelen = remainder
- elif self._linelen + length > self.wrap:
- newline = ('\n' + space) + line
- self._linelen = length
- else:
- newline = line
- self._linelen += length
-
- return newline
-
-
- def _escape_chars(self, text):
- text = text.replace('\\', '\\[u005C]'). \
- replace('.', '\\[char46]'). \
- replace('\'', '\\[u0027]'). \
- replace('`', '\\[u0060]'). \
- replace('~', '\\[u007E]')
- copy = text
-
- for char in copy:
- if len(char) != len(char.encode()):
- uni = char.encode('unicode_escape') \
- .decode()[1:] \
- .replace('x', 'u00') \
- .upper()
- text = text.replace(char, '\\[u' + uni[1:] + ']')
-
- return text
-
-
- def format_unencoded(self, tokensource, outfile):
- self._define_colors(outfile)
-
- outfile.write('.nf\n\\f[CR]\n')
-
- if self.linenos:
- self._write_lineno(outfile)
-
- for ttype, value in tokensource:
- while ttype not in self.styles:
- ttype = ttype.parent
- start, end = self.styles[ttype]
-
- for line in value.splitlines(True):
- if self.wrap > 0:
- line = self._wrap_line(line)
-
- if start and end:
- text = self._escape_chars(line.rstrip('\n'))
- if text != '':
- outfile.write(''.join((start, text, end)))
- else:
- outfile.write(self._escape_chars(line.rstrip('\n')))
-
- if line.endswith('\n'):
- if self.linenos:
- self._write_lineno(outfile)
- self._linelen = 0
- else:
- outfile.write('\n')
- self._linelen = 0
-
- outfile.write('\n.fi')
diff --git a/spaces/Big-Web/MMSD/env/Lib/site-packages/setuptools/_vendor/jaraco/functools.py b/spaces/Big-Web/MMSD/env/Lib/site-packages/setuptools/_vendor/jaraco/functools.py
deleted file mode 100644
index bbd8b29f9c012d62a37393476a5e393405d2918c..0000000000000000000000000000000000000000
--- a/spaces/Big-Web/MMSD/env/Lib/site-packages/setuptools/_vendor/jaraco/functools.py
+++ /dev/null
@@ -1,525 +0,0 @@
-import functools
-import time
-import inspect
-import collections
-import types
-import itertools
-
-import setuptools.extern.more_itertools
-
-from typing import Callable, TypeVar
-
-
-CallableT = TypeVar("CallableT", bound=Callable[..., object])
-
-
-def compose(*funcs):
- """
- Compose any number of unary functions into a single unary function.
-
- >>> import textwrap
- >>> expected = str.strip(textwrap.dedent(compose.__doc__))
- >>> strip_and_dedent = compose(str.strip, textwrap.dedent)
- >>> strip_and_dedent(compose.__doc__) == expected
- True
-
- Compose also allows the innermost function to take arbitrary arguments.
-
- >>> round_three = lambda x: round(x, ndigits=3)
- >>> f = compose(round_three, int.__truediv__)
- >>> [f(3*x, x+1) for x in range(1,10)]
- [1.5, 2.0, 2.25, 2.4, 2.5, 2.571, 2.625, 2.667, 2.7]
- """
-
- def compose_two(f1, f2):
- return lambda *args, **kwargs: f1(f2(*args, **kwargs))
-
- return functools.reduce(compose_two, funcs)
-
-
-def method_caller(method_name, *args, **kwargs):
- """
- Return a function that will call a named method on the
- target object with optional positional and keyword
- arguments.
-
- >>> lower = method_caller('lower')
- >>> lower('MyString')
- 'mystring'
- """
-
- def call_method(target):
- func = getattr(target, method_name)
- return func(*args, **kwargs)
-
- return call_method
-
-
-def once(func):
- """
- Decorate func so it's only ever called the first time.
-
- This decorator can ensure that an expensive or non-idempotent function
- will not be expensive on subsequent calls and is idempotent.
-
- >>> add_three = once(lambda a: a+3)
- >>> add_three(3)
- 6
- >>> add_three(9)
- 6
- >>> add_three('12')
- 6
-
- To reset the stored value, simply clear the property ``saved_result``.
-
- >>> del add_three.saved_result
- >>> add_three(9)
- 12
- >>> add_three(8)
- 12
-
- Or invoke 'reset()' on it.
-
- >>> add_three.reset()
- >>> add_three(-3)
- 0
- >>> add_three(0)
- 0
- """
-
- @functools.wraps(func)
- def wrapper(*args, **kwargs):
- if not hasattr(wrapper, 'saved_result'):
- wrapper.saved_result = func(*args, **kwargs)
- return wrapper.saved_result
-
- wrapper.reset = lambda: vars(wrapper).__delitem__('saved_result')
- return wrapper
-
-
-def method_cache(
- method: CallableT,
- cache_wrapper: Callable[
- [CallableT], CallableT
- ] = functools.lru_cache(), # type: ignore[assignment]
-) -> CallableT:
- """
- Wrap lru_cache to support storing the cache data in the object instances.
-
- Abstracts the common paradigm where the method explicitly saves an
- underscore-prefixed protected property on first call and returns that
- subsequently.
-
- >>> class MyClass:
- ... calls = 0
- ...
- ... @method_cache
- ... def method(self, value):
- ... self.calls += 1
- ... return value
-
- >>> a = MyClass()
- >>> a.method(3)
- 3
- >>> for x in range(75):
- ... res = a.method(x)
- >>> a.calls
- 75
-
- Note that the apparent behavior will be exactly like that of lru_cache
- except that the cache is stored on each instance, so values in one
- instance will not flush values from another, and when an instance is
- deleted, so are the cached values for that instance.
-
- >>> b = MyClass()
- >>> for x in range(35):
- ... res = b.method(x)
- >>> b.calls
- 35
- >>> a.method(0)
- 0
- >>> a.calls
- 75
-
- Note that if method had been decorated with ``functools.lru_cache()``,
- a.calls would have been 76 (due to the cached value of 0 having been
- flushed by the 'b' instance).
-
- Clear the cache with ``.cache_clear()``
-
- >>> a.method.cache_clear()
-
- Same for a method that hasn't yet been called.
-
- >>> c = MyClass()
- >>> c.method.cache_clear()
-
- Another cache wrapper may be supplied:
-
- >>> cache = functools.lru_cache(maxsize=2)
- >>> MyClass.method2 = method_cache(lambda self: 3, cache_wrapper=cache)
- >>> a = MyClass()
- >>> a.method2()
- 3
-
- Caution - do not subsequently wrap the method with another decorator, such
- as ``@property``, which changes the semantics of the function.
-
- See also
- http://code.activestate.com/recipes/577452-a-memoize-decorator-for-instance-methods/
- for another implementation and additional justification.
- """
-
- def wrapper(self: object, *args: object, **kwargs: object) -> object:
- # it's the first call, replace the method with a cached, bound method
- bound_method: CallableT = types.MethodType( # type: ignore[assignment]
- method, self
- )
- cached_method = cache_wrapper(bound_method)
- setattr(self, method.__name__, cached_method)
- return cached_method(*args, **kwargs)
-
- # Support cache clear even before cache has been created.
- wrapper.cache_clear = lambda: None # type: ignore[attr-defined]
-
- return ( # type: ignore[return-value]
- _special_method_cache(method, cache_wrapper) or wrapper
- )
-
-
-def _special_method_cache(method, cache_wrapper):
- """
- Because Python treats special methods differently, it's not
- possible to use instance attributes to implement the cached
- methods.
-
- Instead, install the wrapper method under a different name
- and return a simple proxy to that wrapper.
-
- https://github.com/jaraco/jaraco.functools/issues/5
- """
- name = method.__name__
- special_names = '__getattr__', '__getitem__'
- if name not in special_names:
- return
-
- wrapper_name = '__cached' + name
-
- def proxy(self, *args, **kwargs):
- if wrapper_name not in vars(self):
- bound = types.MethodType(method, self)
- cache = cache_wrapper(bound)
- setattr(self, wrapper_name, cache)
- else:
- cache = getattr(self, wrapper_name)
- return cache(*args, **kwargs)
-
- return proxy
-
-
-def apply(transform):
- """
- Decorate a function with a transform function that is
- invoked on results returned from the decorated function.
-
- >>> @apply(reversed)
- ... def get_numbers(start):
- ... "doc for get_numbers"
- ... return range(start, start+3)
- >>> list(get_numbers(4))
- [6, 5, 4]
- >>> get_numbers.__doc__
- 'doc for get_numbers'
- """
-
- def wrap(func):
- return functools.wraps(func)(compose(transform, func))
-
- return wrap
-
-
-def result_invoke(action):
- r"""
- Decorate a function with an action function that is
- invoked on the results returned from the decorated
- function (for its side-effect), then return the original
- result.
-
- >>> @result_invoke(print)
- ... def add_two(a, b):
- ... return a + b
- >>> x = add_two(2, 3)
- 5
- >>> x
- 5
- """
-
- def wrap(func):
- @functools.wraps(func)
- def wrapper(*args, **kwargs):
- result = func(*args, **kwargs)
- action(result)
- return result
-
- return wrapper
-
- return wrap
-
-
-def call_aside(f, *args, **kwargs):
- """
- Call a function for its side effect after initialization.
-
- >>> @call_aside
- ... def func(): print("called")
- called
- >>> func()
- called
-
- Use functools.partial to pass parameters to the initial call
-
- >>> @functools.partial(call_aside, name='bingo')
- ... def func(name): print("called with", name)
- called with bingo
- """
- f(*args, **kwargs)
- return f
-
-
-class Throttler:
- """
- Rate-limit a function (or other callable)
- """
-
- def __init__(self, func, max_rate=float('Inf')):
- if isinstance(func, Throttler):
- func = func.func
- self.func = func
- self.max_rate = max_rate
- self.reset()
-
- def reset(self):
- self.last_called = 0
-
- def __call__(self, *args, **kwargs):
- self._wait()
- return self.func(*args, **kwargs)
-
- def _wait(self):
- "ensure at least 1/max_rate seconds from last call"
- elapsed = time.time() - self.last_called
- must_wait = 1 / self.max_rate - elapsed
- time.sleep(max(0, must_wait))
- self.last_called = time.time()
-
- def __get__(self, obj, type=None):
- return first_invoke(self._wait, functools.partial(self.func, obj))
-
-
-def first_invoke(func1, func2):
- """
- Return a function that when invoked will invoke func1 without
- any parameters (for its side-effect) and then invoke func2
- with whatever parameters were passed, returning its result.
- """
-
- def wrapper(*args, **kwargs):
- func1()
- return func2(*args, **kwargs)
-
- return wrapper
-
-
-def retry_call(func, cleanup=lambda: None, retries=0, trap=()):
- """
- Given a callable func, trap the indicated exceptions
- for up to 'retries' times, invoking cleanup on the
- exception. On the final attempt, allow any exceptions
- to propagate.
- """
- attempts = itertools.count() if retries == float('inf') else range(retries)
- for attempt in attempts:
- try:
- return func()
- except trap:
- cleanup()
-
- return func()
-
-
-def retry(*r_args, **r_kwargs):
- """
- Decorator wrapper for retry_call. Accepts arguments to retry_call
- except func and then returns a decorator for the decorated function.
-
- Ex:
-
- >>> @retry(retries=3)
- ... def my_func(a, b):
- ... "this is my funk"
- ... print(a, b)
- >>> my_func.__doc__
- 'this is my funk'
- """
-
- def decorate(func):
- @functools.wraps(func)
- def wrapper(*f_args, **f_kwargs):
- bound = functools.partial(func, *f_args, **f_kwargs)
- return retry_call(bound, *r_args, **r_kwargs)
-
- return wrapper
-
- return decorate
-
-
-def print_yielded(func):
- """
- Convert a generator into a function that prints all yielded elements
-
- >>> @print_yielded
- ... def x():
- ... yield 3; yield None
- >>> x()
- 3
- None
- """
- print_all = functools.partial(map, print)
- print_results = compose(more_itertools.consume, print_all, func)
- return functools.wraps(func)(print_results)
-
-
-def pass_none(func):
- """
- Wrap func so it's not called if its first param is None
-
- >>> print_text = pass_none(print)
- >>> print_text('text')
- text
- >>> print_text(None)
- """
-
- @functools.wraps(func)
- def wrapper(param, *args, **kwargs):
- if param is not None:
- return func(param, *args, **kwargs)
-
- return wrapper
-
-
-def assign_params(func, namespace):
- """
- Assign parameters from namespace where func solicits.
-
- >>> def func(x, y=3):
- ... print(x, y)
- >>> assigned = assign_params(func, dict(x=2, z=4))
- >>> assigned()
- 2 3
-
- The usual errors are raised if a function doesn't receive
- its required parameters:
-
- >>> assigned = assign_params(func, dict(y=3, z=4))
- >>> assigned()
- Traceback (most recent call last):
- TypeError: func() ...argument...
-
- It even works on methods:
-
- >>> class Handler:
- ... def meth(self, arg):
- ... print(arg)
- >>> assign_params(Handler().meth, dict(arg='crystal', foo='clear'))()
- crystal
- """
- sig = inspect.signature(func)
- params = sig.parameters.keys()
- call_ns = {k: namespace[k] for k in params if k in namespace}
- return functools.partial(func, **call_ns)
-
-
-def save_method_args(method):
- """
- Wrap a method such that when it is called, the args and kwargs are
- saved on the method.
-
- >>> class MyClass:
- ... @save_method_args
- ... def method(self, a, b):
- ... print(a, b)
- >>> my_ob = MyClass()
- >>> my_ob.method(1, 2)
- 1 2
- >>> my_ob._saved_method.args
- (1, 2)
- >>> my_ob._saved_method.kwargs
- {}
- >>> my_ob.method(a=3, b='foo')
- 3 foo
- >>> my_ob._saved_method.args
- ()
- >>> my_ob._saved_method.kwargs == dict(a=3, b='foo')
- True
-
- The arguments are stored on the instance, allowing for
- different instance to save different args.
-
- >>> your_ob = MyClass()
- >>> your_ob.method({str('x'): 3}, b=[4])
- {'x': 3} [4]
- >>> your_ob._saved_method.args
- ({'x': 3},)
- >>> my_ob._saved_method.args
- ()
- """
- args_and_kwargs = collections.namedtuple('args_and_kwargs', 'args kwargs')
-
- @functools.wraps(method)
- def wrapper(self, *args, **kwargs):
- attr_name = '_saved_' + method.__name__
- attr = args_and_kwargs(args, kwargs)
- setattr(self, attr_name, attr)
- return method(self, *args, **kwargs)
-
- return wrapper
-
-
-def except_(*exceptions, replace=None, use=None):
- """
- Replace the indicated exceptions, if raised, with the indicated
- literal replacement or evaluated expression (if present).
-
- >>> safe_int = except_(ValueError)(int)
- >>> safe_int('five')
- >>> safe_int('5')
- 5
-
- Specify a literal replacement with ``replace``.
-
- >>> safe_int_r = except_(ValueError, replace=0)(int)
- >>> safe_int_r('five')
- 0
-
- Provide an expression to ``use`` to pass through particular parameters.
-
- >>> safe_int_pt = except_(ValueError, use='args[0]')(int)
- >>> safe_int_pt('five')
- 'five'
-
- """
-
- def decorate(func):
- @functools.wraps(func)
- def wrapper(*args, **kwargs):
- try:
- return func(*args, **kwargs)
- except exceptions:
- try:
- return eval(use)
- except TypeError:
- return replace
-
- return wrapper
-
- return decorate
diff --git a/spaces/CVPR/LIVE/thrust/thrust/detail/allocator/fill_construct_range.h b/spaces/CVPR/LIVE/thrust/thrust/detail/allocator/fill_construct_range.h
deleted file mode 100644
index 9de0f7bcbb86b8ed895ca597d75242578ce125f5..0000000000000000000000000000000000000000
--- a/spaces/CVPR/LIVE/thrust/thrust/detail/allocator/fill_construct_range.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2008-2013 NVIDIA Corporation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include
-
-namespace thrust
-{
-namespace detail
-{
-
-
-template
-__host__ __device__
-inline void fill_construct_range(Allocator &a, Pointer p, Size n, const T &value);
-
-
-} // end detail
-} // end thrust
-
-#include
-
diff --git a/spaces/CVPR/LIVE/thrust/thrust/detail/functional/operators/relational_operators.h b/spaces/CVPR/LIVE/thrust/thrust/detail/functional/operators/relational_operators.h
deleted file mode 100644
index 51fd4640a2928021d9ef017c0dd96182d816b856..0000000000000000000000000000000000000000
--- a/spaces/CVPR/LIVE/thrust/thrust/detail/functional/operators/relational_operators.h
+++ /dev/null
@@ -1,323 +0,0 @@
-/*
- * Copyright 2008-2013 NVIDIA Corporation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include
-#include
-#include
-#include
-#include
-
-namespace thrust
-{
-namespace detail
-{
-namespace functional
-{
-
-template
-__host__ __device__
-actor<
- composite<
- transparent_binary_operator>,
- actor,
- typename as_actor::type
- >
->
-operator==(const actor &_1, const T2 &_2)
-{
- return compose(transparent_binary_operator>(),
- make_actor(_1),
- make_actor(_2));
-} // end operator==()
-
-template
-__host__ __device__
-actor<
- composite<
- transparent_binary_operator>,
- typename as_actor::type,
- actor
- >
->
-operator==(const T1 &_1, const actor &_2)
-{
- return compose(transparent_binary_operator>(),
- make_actor(_1),
- make_actor(_2));
-} // end operator==()
-
-template
-__host__ __device__
-actor<
- composite<
- transparent_binary_operator>,
- actor,
- actor
- >
->
-operator==(const actor &_1, const actor &_2)
-{
- return compose(transparent_binary_operator>(),
- make_actor(_1),
- make_actor(_2));
-} // end operator==()
-
-template
-__host__ __device__
-actor<
- composite<
- transparent_binary_operator>,
- actor,
- typename as_actor::type
- >
->
-operator!=(const actor &_1, const T2 &_2)
-{
- return compose(transparent_binary_operator>(),
- make_actor(_1),
- make_actor(_2));
-} // end operator!=()
-
-template
-__host__ __device__
-actor<
- composite<
- transparent_binary_operator>,
- typename as_actor::type,
- actor
- >
->
-operator!=(const T1 &_1, const actor &_2)
-{
- return compose(transparent_binary_operator>(),
- make_actor(_1),
- make_actor(_2));
-} // end operator!=()
-
-template
-__host__ __device__
-actor<
- composite<
- transparent_binary_operator>,
- actor,
- actor
- >
->
-operator!=(const actor &_1, const actor &_2)
-{
- return compose(transparent_binary_operator>(),
- make_actor(_1),
- make_actor(_2));
-} // end operator!=()
-
-template
-__host__ __device__
-actor<
- composite<
- transparent_binary_operator>,
- actor,
- typename as_actor::type
- >
->
-operator>(const actor &_1, const T2 &_2)
-{
- return compose(transparent_binary_operator>(),
- make_actor(_1),
- make_actor(_2));
-} // end operator>()
-
-template
-__host__ __device__
-actor<
- composite<
- transparent_binary_operator>,
- typename as_actor::type,
- actor
- >
->
-operator>(const T1 &_1, const actor &_2)
-{
- return compose(transparent_binary_operator>(),
- make_actor(_1),
- make_actor(_2));
-} // end operator>()
-
-template
-__host__ __device__
-actor<
- composite<
- transparent_binary_operator>,
- actor,
- actor
- >
->
-operator>(const actor &_1, const actor &_2)
-{
- return compose(transparent_binary_operator>(),
- make_actor(_1),
- make_actor(_2));
-} // end operator>()
-
-template
-__host__ __device__
-actor<
- composite<
- transparent_binary_operator>,
- actor,
- typename as_actor::type
- >
->
-operator<(const actor &_1, const T2 &_2)
-{
- return compose(transparent_binary_operator>(),
- make_actor(_1),
- make_actor(_2));
-} // end operator<()
-
-template
-__host__ __device__
-actor<
- composite<
- transparent_binary_operator>,
- typename as_actor::type,
- actor
- >
->
-operator<(const T1 &_1, const actor &_2)
-{
- return compose(transparent_binary_operator>(),
- make_actor(_1),
- make_actor(_2));
-} // end operator<()
-
-template
-__host__ __device__
-actor<
- composite<
- transparent_binary_operator>,
- actor,
- actor
- >
->
-operator<(const actor &_1, const actor &_2)
-{
- return compose(transparent_binary_operator>(),
- make_actor(_1),
- make_actor(_2));
-} // end operator<()
-
-template
-__host__ __device__
-actor<
- composite<
- transparent_binary_operator>,
- actor,
- typename as_actor::type
- >
->
-operator>=(const actor &_1, const T2 &_2)
-{
- return compose(transparent_binary_operator>(),
- make_actor(_1),
- make_actor(_2));
-} // end operator>=()
-
-template
-__host__ __device__
-actor<
- composite<
- transparent_binary_operator>,
- typename as_actor::type,
- actor
- >
->
-operator>=(const T1 &_1, const actor &_2)
-{
- return compose(transparent_binary_operator>(),
- make_actor(_1),
- make_actor(_2));
-} // end operator>=()
-
-template
-__host__ __device__
-actor<
- composite<
- transparent_binary_operator>,
- actor,
- actor
- >
->
-operator>=(const actor &_1, const actor &_2)
-{
- return compose(transparent_binary_operator>(),
- make_actor(_1),
- make_actor(_2));
-} // end operator>=()
-
-template
-__host__ __device__
-actor<
- composite<
- transparent_binary_operator>,
- actor,
- typename as_actor::type
- >
->
-operator<=(const actor &_1, const T2 &_2)
-{
- return compose(transparent_binary_operator>(),
- make_actor(_1),
- make_actor(_2));
-} // end operator<=()
-
-template
-__host__ __device__
-actor<
- composite<
- transparent_binary_operator>,
- typename as_actor::type,
- actor
- >
->
-operator<=(const T1 &_1, const actor &_2)
-{
- return compose(transparent_binary_operator>(),
- make_actor(_1),
- make_actor(_2));
-} // end operator<=()
-
-template
-__host__ __device__
-actor<
- composite<
- transparent_binary_operator>,
- actor,
- actor
- >
->
-operator<=(const actor &_1, const actor &_2)
-{
- return compose(transparent_binary_operator>(),
- make_actor(_1),
- make_actor(_2));
-} // end operator<=()
-
-} // end functional
-} // end detail
-} // end thrust
-
diff --git a/spaces/CVPR/LIVE/thrust/thrust/iterator/constant_iterator.h b/spaces/CVPR/LIVE/thrust/thrust/iterator/constant_iterator.h
deleted file mode 100644
index cda85291855d2461da2fcd958fb05746d94101d0..0000000000000000000000000000000000000000
--- a/spaces/CVPR/LIVE/thrust/thrust/iterator/constant_iterator.h
+++ /dev/null
@@ -1,251 +0,0 @@
-/*
- * Copyright 2008-2013 NVIDIA Corporation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-/*! \file thrust/iterator/constant_iterator.h
- * \brief An iterator which returns a constant value when
- * dereferenced
- */
-
-#pragma once
-
-#include
-#include
-#include
-
-namespace thrust
-{
-
-/*! \addtogroup iterators
- * \{
- */
-
-/*! \addtogroup fancyiterator Fancy Iterators
- * \ingroup iterators
- * \{
- */
-
-/*! \p constant_iterator is an iterator which represents a pointer into a range
- * of constant values. This iterator is useful for creating a range filled with the same
- * value without explicitly storing it in memory. Using \p constant_iterator saves both
- * memory capacity and bandwidth.
- *
- * The following code snippet demonstrates how to create a \p constant_iterator whose
- * \c value_type is \c int and whose value is \c 10.
- *
- * \code
- * #include
- *
- * thrust::constant_iterator iter(10);
- *
- * *iter; // returns 10
- * iter[0]; // returns 10
- * iter[1]; // returns 10
- * iter[13]; // returns 10
- *
- * // and so on...
- * \endcode
- *
- * This next example demonstrates how to use a \p constant_iterator with the
- * \p thrust::transform function to increment all elements of a sequence by the
- * same value. We will create a temporary \p constant_iterator with the function
- * \p make_constant_iterator function in order to avoid explicitly specifying
- * its type:
- *
- * \code
- * #include
- * #include
- * #include
- * #include
- *
- * int main()
- * {
- * thrust::device_vector data(4);
- * data[0] = 3;
- * data[1] = 7;
- * data[2] = 2;
- * data[3] = 5;
- *
- * // add 10 to all values in data
- * thrust::transform(data.begin(), data.end(),
- * thrust::make_constant_iterator(10),
- * data.begin(),
- * thrust::plus());
- *
- * // data is now [13, 17, 12, 15]
- *
- * return 0;
- * }
- * \endcode
- *
- * \see make_constant_iterator
- */
-template
- class constant_iterator
- : public detail::constant_iterator_base::type
-{
- /*! \cond
- */
- friend class thrust::iterator_core_access;
- typedef typename detail::constant_iterator_base::type super_t;
- typedef typename detail::constant_iterator_base::incrementable incrementable;
- typedef typename detail::constant_iterator_base::base_iterator base_iterator;
-
- public:
- typedef typename super_t::reference reference;
- typedef typename super_t::value_type value_type;
-
- /*! \endcond
- */
-
- /*! Null constructor initializes this \p constant_iterator's constant using its
- * null constructor.
- */
- __host__ __device__
- constant_iterator()
- : super_t(), m_value() {}
-
- /*! Copy constructor copies the value of another \p constant_iterator into this
- * \p constant_iterator.
- *
- * \p rhs The constant_iterator to copy.
- */
- __host__ __device__
- constant_iterator(constant_iterator const &rhs)
- : super_t(rhs.base()), m_value(rhs.m_value) {}
-
- /*! Copy constructor copies the value of another \p constant_iterator with related
- * System type.
- *
- * \param rhs The \p constant_iterator to copy.
- */
- template
- __host__ __device__
- constant_iterator(constant_iterator const &rhs,
- typename thrust::detail::enable_if_convertible<
- typename thrust::iterator_system >::type,
- typename thrust::iterator_system::type
- >::type * = 0)
- : super_t(rhs.base()), m_value(rhs.value()) {}
-
- /*! This constructor receives a value to use as the constant value of this
- * \p constant_iterator and an index specifying the location of this
- * \p constant_iterator in a sequence.
- *
- * \p v The value of this \p constant_iterator's constant value.
- * \p i The index of this \p constant_iterator in a sequence. Defaults to the
- * value returned by \c Incrementable's null constructor. For example,
- * when Incrementable == int , \c 0.
- */
- __host__ __device__
- constant_iterator(value_type const& v, incrementable const &i = incrementable())
- : super_t(base_iterator(i)), m_value(v) {}
-
- /*! This constructor is templated to allow construction from a value type and
- * incrementable type related this this \p constant_iterator's respective types.
- *
- * \p v The value of this \p constant_iterator's constant value.
- * \p i The index of this \p constant_iterator in a sequence. Defaults to the
- * value returned by \c Incrementable's null constructor. For example,
- * when Incrementable == int , \c 0.
- */
- template
- __host__ __device__
- constant_iterator(OtherValue const& v, OtherIncrementable const& i = incrementable())
- : super_t(base_iterator(i)), m_value(v) {}
-
- /*! This method returns the value of this \p constant_iterator's constant value.
- * \return A \c const reference to this \p constant_iterator's constant value.
- */
- __host__ __device__
- Value const& value() const
- { return m_value; }
-
- /*! \cond
- */
-
- protected:
- __host__ __device__
- Value const& value_reference() const
- { return m_value; }
-
- __host__ __device__
- Value & value_reference()
- { return m_value; }
-
- private: // Core iterator interface
- __host__ __device__
- reference dereference() const
- {
- return m_value;
- }
-
- private:
- Value m_value;
-
- /*! \endcond
- */
-}; // end constant_iterator
-
-
-/*! This version of \p make_constant_iterator creates a \p constant_iterator
- * from values given for both value and index. The type of \p constant_iterator
- * may be inferred by the compiler from the types of its parameters.
- *
- * \param x The value of the returned \p constant_iterator's constant value.
- * \param i The index of the returned \p constant_iterator within a sequence.
- * The type of this parameter defaults to \c int. In the default case,
- * the value of this parameter is \c 0.
- *
- * \return A new \p constant_iterator with constant value & index as given
- * by \p x & \p i.
- *
- * \see constant_iterator
- */
-template
-inline __host__ __device__
-constant_iterator make_constant_iterator(V x, I i = int())
-{
- return constant_iterator(x, i);
-} // end make_constant_iterator()
-
-
-/*! This version of \p make_constant_iterator creates a \p constant_iterator
- * using only a parameter for the desired constant value. The value of the
- * returned \p constant_iterator's index is set to \c 0.
- *
- * \param x The value of the returned \p constant_iterator's constant value.
- * \return A new \p constant_iterator with constant value equal to \p x and
- * index equal to \c 0.
- * \see constant_iterator
- */
-template
-inline __host__ __device__
-constant_iterator make_constant_iterator(V x)
-{
- return constant_iterator(x, 0);
-} // end make_constant_iterator()
-
-/*! \} // end fancyiterators
- */
-
-/*! \} // end iterators
- */
-
-} // end namespace thrust
-
diff --git a/spaces/CVPR/MonoScene/monoscene/CRP3D.py b/spaces/CVPR/MonoScene/monoscene/CRP3D.py
deleted file mode 100644
index c88b7b309e6fe66f597cafe2a5eb8c6d29343b7e..0000000000000000000000000000000000000000
--- a/spaces/CVPR/MonoScene/monoscene/CRP3D.py
+++ /dev/null
@@ -1,97 +0,0 @@
-import torch
-import torch.nn as nn
-from monoscene.modules import (
- Process,
- ASPP,
-)
-
-
-class CPMegaVoxels(nn.Module):
- def __init__(self, feature, size, n_relations=4, bn_momentum=0.0003):
- super().__init__()
- self.size = size
- self.n_relations = n_relations
- print("n_relations", self.n_relations)
- self.flatten_size = size[0] * size[1] * size[2]
- self.feature = feature
- self.context_feature = feature * 2
- self.flatten_context_size = (size[0] // 2) * (size[1] // 2) * (size[2] // 2)
- padding = ((size[0] + 1) % 2, (size[1] + 1) % 2, (size[2] + 1) % 2)
-
- self.mega_context = nn.Sequential(
- nn.Conv3d(
- feature, self.context_feature, stride=2, padding=padding, kernel_size=3
- ),
- )
- self.flatten_context_size = (size[0] // 2) * (size[1] // 2) * (size[2] // 2)
-
- self.context_prior_logits = nn.ModuleList(
- [
- nn.Sequential(
- nn.Conv3d(
- self.feature,
- self.flatten_context_size,
- padding=0,
- kernel_size=1,
- ),
- )
- for i in range(n_relations)
- ]
- )
- self.aspp = ASPP(feature, [1, 2, 3])
-
- self.resize = nn.Sequential(
- nn.Conv3d(
- self.context_feature * self.n_relations + feature,
- feature,
- kernel_size=1,
- padding=0,
- bias=False,
- ),
- Process(feature, nn.BatchNorm3d, bn_momentum, dilations=[1]),
- )
-
- def forward(self, input):
- ret = {}
- bs = input.shape[0]
-
- x_agg = self.aspp(input)
-
- # get the mega context
- x_mega_context_raw = self.mega_context(x_agg)
- x_mega_context = x_mega_context_raw.reshape(bs, self.context_feature, -1)
- x_mega_context = x_mega_context.permute(0, 2, 1)
-
- # get context prior map
- x_context_prior_logits = []
- x_context_rels = []
- for rel in range(self.n_relations):
-
- # Compute the relation matrices
- x_context_prior_logit = self.context_prior_logits[rel](x_agg)
- x_context_prior_logit = x_context_prior_logit.reshape(
- bs, self.flatten_context_size, self.flatten_size
- )
- x_context_prior_logits.append(x_context_prior_logit.unsqueeze(1))
-
- x_context_prior_logit = x_context_prior_logit.permute(0, 2, 1)
- x_context_prior = torch.sigmoid(x_context_prior_logit)
-
- # Multiply the relation matrices with the mega context to gather context features
- x_context_rel = torch.bmm(x_context_prior, x_mega_context) # bs, N, f
- x_context_rels.append(x_context_rel)
-
- x_context = torch.cat(x_context_rels, dim=2)
- x_context = x_context.permute(0, 2, 1)
- x_context = x_context.reshape(
- bs, x_context.shape[1], self.size[0], self.size[1], self.size[2]
- )
-
- x = torch.cat([input, x_context], dim=1)
- x = self.resize(x)
-
- x_context_prior_logits = torch.cat(x_context_prior_logits, dim=1)
- ret["P_logits"] = x_context_prior_logits
- ret["x"] = x
-
- return ret
diff --git a/spaces/CVPR/WALT/mmdet/models/dense_heads/ld_head.py b/spaces/CVPR/WALT/mmdet/models/dense_heads/ld_head.py
deleted file mode 100644
index 501e1f7befa086f0b2f818531807411fc383d7bd..0000000000000000000000000000000000000000
--- a/spaces/CVPR/WALT/mmdet/models/dense_heads/ld_head.py
+++ /dev/null
@@ -1,261 +0,0 @@
-import torch
-from mmcv.runner import force_fp32
-
-from mmdet.core import (bbox2distance, bbox_overlaps, distance2bbox,
- multi_apply, reduce_mean)
-from ..builder import HEADS, build_loss
-from .gfl_head import GFLHead
-
-
-@HEADS.register_module()
-class LDHead(GFLHead):
- """Localization distillation Head. (Short description)
-
- It utilizes the learned bbox distributions to transfer the localization
- dark knowledge from teacher to student. Original paper: `Localization
- Distillation for Object Detection. `_
-
- Args:
- num_classes (int): Number of categories excluding the background
- category.
- in_channels (int): Number of channels in the input feature map.
- loss_ld (dict): Config of Localization Distillation Loss (LD),
- T is the temperature for distillation.
- """
-
- def __init__(self,
- num_classes,
- in_channels,
- loss_ld=dict(
- type='LocalizationDistillationLoss',
- loss_weight=0.25,
- T=10),
- **kwargs):
-
- super(LDHead, self).__init__(num_classes, in_channels, **kwargs)
- self.loss_ld = build_loss(loss_ld)
-
- def loss_single(self, anchors, cls_score, bbox_pred, labels, label_weights,
- bbox_targets, stride, soft_targets, num_total_samples):
- """Compute loss of a single scale level.
-
- Args:
- anchors (Tensor): Box reference for each scale level with shape
- (N, num_total_anchors, 4).
- cls_score (Tensor): Cls and quality joint scores for each scale
- level has shape (N, num_classes, H, W).
- bbox_pred (Tensor): Box distribution logits for each scale
- level with shape (N, 4*(n+1), H, W), n is max value of integral
- set.
- labels (Tensor): Labels of each anchors with shape
- (N, num_total_anchors).
- label_weights (Tensor): Label weights of each anchor with shape
- (N, num_total_anchors)
- bbox_targets (Tensor): BBox regression targets of each anchor wight
- shape (N, num_total_anchors, 4).
- stride (tuple): Stride in this scale level.
- num_total_samples (int): Number of positive samples that is
- reduced over all GPUs.
-
- Returns:
- dict[tuple, Tensor]: Loss components and weight targets.
- """
- assert stride[0] == stride[1], 'h stride is not equal to w stride!'
- anchors = anchors.reshape(-1, 4)
- cls_score = cls_score.permute(0, 2, 3,
- 1).reshape(-1, self.cls_out_channels)
- bbox_pred = bbox_pred.permute(0, 2, 3,
- 1).reshape(-1, 4 * (self.reg_max + 1))
- soft_targets = soft_targets.permute(0, 2, 3,
- 1).reshape(-1,
- 4 * (self.reg_max + 1))
-
- bbox_targets = bbox_targets.reshape(-1, 4)
- labels = labels.reshape(-1)
- label_weights = label_weights.reshape(-1)
-
- # FG cat_id: [0, num_classes -1], BG cat_id: num_classes
- bg_class_ind = self.num_classes
- pos_inds = ((labels >= 0)
- & (labels < bg_class_ind)).nonzero().squeeze(1)
- score = label_weights.new_zeros(labels.shape)
-
- if len(pos_inds) > 0:
- pos_bbox_targets = bbox_targets[pos_inds]
- pos_bbox_pred = bbox_pred[pos_inds]
- pos_anchors = anchors[pos_inds]
- pos_anchor_centers = self.anchor_center(pos_anchors) / stride[0]
-
- weight_targets = cls_score.detach().sigmoid()
- weight_targets = weight_targets.max(dim=1)[0][pos_inds]
- pos_bbox_pred_corners = self.integral(pos_bbox_pred)
- pos_decode_bbox_pred = distance2bbox(pos_anchor_centers,
- pos_bbox_pred_corners)
- pos_decode_bbox_targets = pos_bbox_targets / stride[0]
- score[pos_inds] = bbox_overlaps(
- pos_decode_bbox_pred.detach(),
- pos_decode_bbox_targets,
- is_aligned=True)
- pred_corners = pos_bbox_pred.reshape(-1, self.reg_max + 1)
- pos_soft_targets = soft_targets[pos_inds]
- soft_corners = pos_soft_targets.reshape(-1, self.reg_max + 1)
-
- target_corners = bbox2distance(pos_anchor_centers,
- pos_decode_bbox_targets,
- self.reg_max).reshape(-1)
-
- # regression loss
- loss_bbox = self.loss_bbox(
- pos_decode_bbox_pred,
- pos_decode_bbox_targets,
- weight=weight_targets,
- avg_factor=1.0)
-
- # dfl loss
- loss_dfl = self.loss_dfl(
- pred_corners,
- target_corners,
- weight=weight_targets[:, None].expand(-1, 4).reshape(-1),
- avg_factor=4.0)
-
- # ld loss
- loss_ld = self.loss_ld(
- pred_corners,
- soft_corners,
- weight=weight_targets[:, None].expand(-1, 4).reshape(-1),
- avg_factor=4.0)
-
- else:
- loss_ld = bbox_pred.sum() * 0
- loss_bbox = bbox_pred.sum() * 0
- loss_dfl = bbox_pred.sum() * 0
- weight_targets = bbox_pred.new_tensor(0)
-
- # cls (qfl) loss
- loss_cls = self.loss_cls(
- cls_score, (labels, score),
- weight=label_weights,
- avg_factor=num_total_samples)
-
- return loss_cls, loss_bbox, loss_dfl, loss_ld, weight_targets.sum()
-
- def forward_train(self,
- x,
- out_teacher,
- img_metas,
- gt_bboxes,
- gt_labels=None,
- gt_bboxes_ignore=None,
- proposal_cfg=None,
- **kwargs):
- """
- Args:
- x (list[Tensor]): Features from FPN.
- img_metas (list[dict]): Meta information of each image, e.g.,
- image size, scaling factor, etc.
- gt_bboxes (Tensor): Ground truth bboxes of the image,
- shape (num_gts, 4).
- gt_labels (Tensor): Ground truth labels of each box,
- shape (num_gts,).
- gt_bboxes_ignore (Tensor): Ground truth bboxes to be
- ignored, shape (num_ignored_gts, 4).
- proposal_cfg (mmcv.Config): Test / postprocessing configuration,
- if None, test_cfg would be used
-
- Returns:
- tuple[dict, list]: The loss components and proposals of each image.
-
- - losses (dict[str, Tensor]): A dictionary of loss components.
- - proposal_list (list[Tensor]): Proposals of each image.
- """
- outs = self(x)
- soft_target = out_teacher[1]
- if gt_labels is None:
- loss_inputs = outs + (gt_bboxes, soft_target, img_metas)
- else:
- loss_inputs = outs + (gt_bboxes, gt_labels, soft_target, img_metas)
- losses = self.loss(*loss_inputs, gt_bboxes_ignore=gt_bboxes_ignore)
- if proposal_cfg is None:
- return losses
- else:
- proposal_list = self.get_bboxes(*outs, img_metas, cfg=proposal_cfg)
- return losses, proposal_list
-
- @force_fp32(apply_to=('cls_scores', 'bbox_preds'))
- def loss(self,
- cls_scores,
- bbox_preds,
- gt_bboxes,
- gt_labels,
- soft_target,
- img_metas,
- gt_bboxes_ignore=None):
- """Compute losses of the head.
-
- Args:
- cls_scores (list[Tensor]): Cls and quality scores for each scale
- level has shape (N, num_classes, H, W).
- bbox_preds (list[Tensor]): Box distribution logits for each scale
- level with shape (N, 4*(n+1), H, W), n is max value of integral
- set.
- gt_bboxes (list[Tensor]): Ground truth bboxes for each image with
- shape (num_gts, 4) in [tl_x, tl_y, br_x, br_y] format.
- gt_labels (list[Tensor]): class indices corresponding to each box
- img_metas (list[dict]): Meta information of each image, e.g.,
- image size, scaling factor, etc.
- gt_bboxes_ignore (list[Tensor] | None): specify which bounding
- boxes can be ignored when computing the loss.
-
- Returns:
- dict[str, Tensor]: A dictionary of loss components.
- """
-
- featmap_sizes = [featmap.size()[-2:] for featmap in cls_scores]
- assert len(featmap_sizes) == self.anchor_generator.num_levels
-
- device = cls_scores[0].device
- anchor_list, valid_flag_list = self.get_anchors(
- featmap_sizes, img_metas, device=device)
- label_channels = self.cls_out_channels if self.use_sigmoid_cls else 1
-
- cls_reg_targets = self.get_targets(
- anchor_list,
- valid_flag_list,
- gt_bboxes,
- img_metas,
- gt_bboxes_ignore_list=gt_bboxes_ignore,
- gt_labels_list=gt_labels,
- label_channels=label_channels)
- if cls_reg_targets is None:
- return None
-
- (anchor_list, labels_list, label_weights_list, bbox_targets_list,
- bbox_weights_list, num_total_pos, num_total_neg) = cls_reg_targets
-
- num_total_samples = reduce_mean(
- torch.tensor(num_total_pos, dtype=torch.float,
- device=device)).item()
- num_total_samples = max(num_total_samples, 1.0)
-
- losses_cls, losses_bbox, losses_dfl, losses_ld, \
- avg_factor = multi_apply(
- self.loss_single,
- anchor_list,
- cls_scores,
- bbox_preds,
- labels_list,
- label_weights_list,
- bbox_targets_list,
- self.anchor_generator.strides,
- soft_target,
- num_total_samples=num_total_samples)
-
- avg_factor = sum(avg_factor) + 1e-6
- avg_factor = reduce_mean(avg_factor).item()
- losses_bbox = [x / avg_factor for x in losses_bbox]
- losses_dfl = [x / avg_factor for x in losses_dfl]
- return dict(
- loss_cls=losses_cls,
- loss_bbox=losses_bbox,
- loss_dfl=losses_dfl,
- loss_ld=losses_ld)
diff --git a/spaces/CVPR/regionclip-demo/detectron2/modeling/box_regression.py b/spaces/CVPR/regionclip-demo/detectron2/modeling/box_regression.py
deleted file mode 100644
index 12be0008b66bd4954a5139aeb6e07d71f8159caa..0000000000000000000000000000000000000000
--- a/spaces/CVPR/regionclip-demo/detectron2/modeling/box_regression.py
+++ /dev/null
@@ -1,270 +0,0 @@
-# Copyright (c) Facebook, Inc. and its affiliates.
-import math
-from typing import List, Tuple
-import torch
-from fvcore.nn import giou_loss, smooth_l1_loss
-
-from detectron2.layers import cat
-from detectron2.structures import Boxes
-
-# Value for clamping large dw and dh predictions. The heuristic is that we clamp
-# such that dw and dh are no larger than what would transform a 16px box into a
-# 1000px box (based on a small anchor, 16px, and a typical image size, 1000px).
-_DEFAULT_SCALE_CLAMP = math.log(1000.0 / 16)
-
-
-__all__ = ["Box2BoxTransform", "Box2BoxTransformRotated"]
-
-
-@torch.jit.script
-class Box2BoxTransform(object):
- """
- The box-to-box transform defined in R-CNN. The transformation is parameterized
- by 4 deltas: (dx, dy, dw, dh). The transformation scales the box's width and height
- by exp(dw), exp(dh) and shifts a box's center by the offset (dx * width, dy * height).
- """
-
- def __init__(
- self, weights: Tuple[float, float, float, float], scale_clamp: float = _DEFAULT_SCALE_CLAMP
- ):
- """
- Args:
- weights (4-element tuple): Scaling factors that are applied to the
- (dx, dy, dw, dh) deltas. In Fast R-CNN, these were originally set
- such that the deltas have unit variance; now they are treated as
- hyperparameters of the system.
- scale_clamp (float): When predicting deltas, the predicted box scaling
- factors (dw and dh) are clamped such that they are <= scale_clamp.
- """
- self.weights = weights
- self.scale_clamp = scale_clamp
-
- def get_deltas(self, src_boxes, target_boxes):
- """
- Get box regression transformation deltas (dx, dy, dw, dh) that can be used
- to transform the `src_boxes` into the `target_boxes`. That is, the relation
- ``target_boxes == self.apply_deltas(deltas, src_boxes)`` is true (unless
- any delta is too large and is clamped).
-
- Args:
- src_boxes (Tensor): source boxes, e.g., object proposals
- target_boxes (Tensor): target of the transformation, e.g., ground-truth
- boxes.
- """
- assert isinstance(src_boxes, torch.Tensor), type(src_boxes)
- assert isinstance(target_boxes, torch.Tensor), type(target_boxes)
-
- src_widths = src_boxes[:, 2] - src_boxes[:, 0]
- src_heights = src_boxes[:, 3] - src_boxes[:, 1]
- src_ctr_x = src_boxes[:, 0] + 0.5 * src_widths
- src_ctr_y = src_boxes[:, 1] + 0.5 * src_heights
-
- target_widths = target_boxes[:, 2] - target_boxes[:, 0]
- target_heights = target_boxes[:, 3] - target_boxes[:, 1]
- target_ctr_x = target_boxes[:, 0] + 0.5 * target_widths
- target_ctr_y = target_boxes[:, 1] + 0.5 * target_heights
-
- wx, wy, ww, wh = self.weights
- dx = wx * (target_ctr_x - src_ctr_x) / src_widths
- dy = wy * (target_ctr_y - src_ctr_y) / src_heights
- dw = ww * torch.log(target_widths / src_widths)
- dh = wh * torch.log(target_heights / src_heights)
-
- deltas = torch.stack((dx, dy, dw, dh), dim=1)
- assert (src_widths > 0).all().item(), "Input boxes to Box2BoxTransform are not valid!"
- return deltas
-
- def apply_deltas(self, deltas, boxes):
- """
- Apply transformation `deltas` (dx, dy, dw, dh) to `boxes`.
-
- Args:
- deltas (Tensor): transformation deltas of shape (N, k*4), where k >= 1.
- deltas[i] represents k potentially different class-specific
- box transformations for the single box boxes[i].
- boxes (Tensor): boxes to transform, of shape (N, 4)
- """
- deltas = deltas.float() # ensure fp32 for decoding precision
- boxes = boxes.to(deltas.dtype)
-
- widths = boxes[:, 2] - boxes[:, 0]
- heights = boxes[:, 3] - boxes[:, 1]
- ctr_x = boxes[:, 0] + 0.5 * widths
- ctr_y = boxes[:, 1] + 0.5 * heights
-
- wx, wy, ww, wh = self.weights
- dx = deltas[:, 0::4] / wx
- dy = deltas[:, 1::4] / wy
- dw = deltas[:, 2::4] / ww
- dh = deltas[:, 3::4] / wh
-
- # Prevent sending too large values into torch.exp()
- dw = torch.clamp(dw, max=self.scale_clamp)
- dh = torch.clamp(dh, max=self.scale_clamp)
-
- pred_ctr_x = dx * widths[:, None] + ctr_x[:, None]
- pred_ctr_y = dy * heights[:, None] + ctr_y[:, None]
- pred_w = torch.exp(dw) * widths[:, None]
- pred_h = torch.exp(dh) * heights[:, None]
-
- x1 = pred_ctr_x - 0.5 * pred_w
- y1 = pred_ctr_y - 0.5 * pred_h
- x2 = pred_ctr_x + 0.5 * pred_w
- y2 = pred_ctr_y + 0.5 * pred_h
- pred_boxes = torch.stack((x1, y1, x2, y2), dim=-1)
- return pred_boxes.reshape(deltas.shape)
-
-
-@torch.jit.script
-class Box2BoxTransformRotated(object):
- """
- The box-to-box transform defined in Rotated R-CNN. The transformation is parameterized
- by 5 deltas: (dx, dy, dw, dh, da). The transformation scales the box's width and height
- by exp(dw), exp(dh), shifts a box's center by the offset (dx * width, dy * height),
- and rotate a box's angle by da (radians).
- Note: angles of deltas are in radians while angles of boxes are in degrees.
- """
-
- def __init__(
- self,
- weights: Tuple[float, float, float, float, float],
- scale_clamp: float = _DEFAULT_SCALE_CLAMP,
- ):
- """
- Args:
- weights (5-element tuple): Scaling factors that are applied to the
- (dx, dy, dw, dh, da) deltas. These are treated as
- hyperparameters of the system.
- scale_clamp (float): When predicting deltas, the predicted box scaling
- factors (dw and dh) are clamped such that they are <= scale_clamp.
- """
- self.weights = weights
- self.scale_clamp = scale_clamp
-
- def get_deltas(self, src_boxes, target_boxes):
- """
- Get box regression transformation deltas (dx, dy, dw, dh, da) that can be used
- to transform the `src_boxes` into the `target_boxes`. That is, the relation
- ``target_boxes == self.apply_deltas(deltas, src_boxes)`` is true (unless
- any delta is too large and is clamped).
-
- Args:
- src_boxes (Tensor): Nx5 source boxes, e.g., object proposals
- target_boxes (Tensor): Nx5 target of the transformation, e.g., ground-truth
- boxes.
- """
- assert isinstance(src_boxes, torch.Tensor), type(src_boxes)
- assert isinstance(target_boxes, torch.Tensor), type(target_boxes)
-
- src_ctr_x, src_ctr_y, src_widths, src_heights, src_angles = torch.unbind(src_boxes, dim=1)
-
- target_ctr_x, target_ctr_y, target_widths, target_heights, target_angles = torch.unbind(
- target_boxes, dim=1
- )
-
- wx, wy, ww, wh, wa = self.weights
- dx = wx * (target_ctr_x - src_ctr_x) / src_widths
- dy = wy * (target_ctr_y - src_ctr_y) / src_heights
- dw = ww * torch.log(target_widths / src_widths)
- dh = wh * torch.log(target_heights / src_heights)
- # Angles of deltas are in radians while angles of boxes are in degrees.
- # the conversion to radians serve as a way to normalize the values
- da = target_angles - src_angles
- da = (da + 180.0) % 360.0 - 180.0 # make it in [-180, 180)
- da *= wa * math.pi / 180.0
-
- deltas = torch.stack((dx, dy, dw, dh, da), dim=1)
- assert (
- (src_widths > 0).all().item()
- ), "Input boxes to Box2BoxTransformRotated are not valid!"
- return deltas
-
- def apply_deltas(self, deltas, boxes):
- """
- Apply transformation `deltas` (dx, dy, dw, dh, da) to `boxes`.
-
- Args:
- deltas (Tensor): transformation deltas of shape (N, k*5).
- deltas[i] represents box transformation for the single box boxes[i].
- boxes (Tensor): boxes to transform, of shape (N, 5)
- """
- assert deltas.shape[1] % 5 == 0 and boxes.shape[1] == 5
-
- boxes = boxes.to(deltas.dtype).unsqueeze(2)
-
- ctr_x = boxes[:, 0]
- ctr_y = boxes[:, 1]
- widths = boxes[:, 2]
- heights = boxes[:, 3]
- angles = boxes[:, 4]
-
- wx, wy, ww, wh, wa = self.weights
-
- dx = deltas[:, 0::5] / wx
- dy = deltas[:, 1::5] / wy
- dw = deltas[:, 2::5] / ww
- dh = deltas[:, 3::5] / wh
- da = deltas[:, 4::5] / wa
-
- # Prevent sending too large values into torch.exp()
- dw = torch.clamp(dw, max=self.scale_clamp)
- dh = torch.clamp(dh, max=self.scale_clamp)
-
- pred_boxes = torch.zeros_like(deltas)
- pred_boxes[:, 0::5] = dx * widths + ctr_x # x_ctr
- pred_boxes[:, 1::5] = dy * heights + ctr_y # y_ctr
- pred_boxes[:, 2::5] = torch.exp(dw) * widths # width
- pred_boxes[:, 3::5] = torch.exp(dh) * heights # height
-
- # Following original RRPN implementation,
- # angles of deltas are in radians while angles of boxes are in degrees.
- pred_angle = da * 180.0 / math.pi + angles
- pred_angle = (pred_angle + 180.0) % 360.0 - 180.0 # make it in [-180, 180)
-
- pred_boxes[:, 4::5] = pred_angle
-
- return pred_boxes
-
-
-def _dense_box_regression_loss(
- anchors: List[Boxes],
- box2box_transform: Box2BoxTransform,
- pred_anchor_deltas: List[torch.Tensor],
- gt_boxes: List[torch.Tensor],
- fg_mask: torch.Tensor,
- box_reg_loss_type="smooth_l1",
- smooth_l1_beta=0.0,
-):
- """
- Compute loss for dense multi-level box regression.
- Loss is accumulated over ``fg_mask``.
-
- Args:
- anchors: #lvl anchor boxes, each is (HixWixA, 4)
- pred_anchor_deltas: #lvl predictions, each is (N, HixWixA, 4)
- gt_boxes: N ground truth boxes, each has shape (R, 4) (R = sum(Hi * Wi * A))
- fg_mask: the foreground boolean mask of shape (N, R) to compute loss on
- box_reg_loss_type (str): Loss type to use. Supported losses: "smooth_l1", "giou".
- smooth_l1_beta (float): beta parameter for the smooth L1 regression loss. Default to
- use L1 loss. Only used when `box_reg_loss_type` is "smooth_l1"
- """
- anchors = type(anchors[0]).cat(anchors).tensor # (R, 4)
- if box_reg_loss_type == "smooth_l1":
- gt_anchor_deltas = [box2box_transform.get_deltas(anchors, k) for k in gt_boxes]
- gt_anchor_deltas = torch.stack(gt_anchor_deltas) # (N, R, 4)
- loss_box_reg = smooth_l1_loss(
- cat(pred_anchor_deltas, dim=1)[fg_mask],
- gt_anchor_deltas[fg_mask],
- beta=smooth_l1_beta,
- reduction="sum",
- )
- elif box_reg_loss_type == "giou":
- pred_boxes = [
- box2box_transform.apply_deltas(k, anchors) for k in cat(pred_anchor_deltas, dim=1)
- ]
- loss_box_reg = giou_loss(
- torch.stack(pred_boxes)[fg_mask], torch.stack(gt_boxes)[fg_mask], reduction="sum"
- )
- else:
- raise ValueError(f"Invalid dense box regression loss type '{box_reg_loss_type}'")
- return loss_box_reg
diff --git a/spaces/Catmeow/Text_Generation_Fine_Tune/app.py b/spaces/Catmeow/Text_Generation_Fine_Tune/app.py
deleted file mode 100644
index 1b623130ff67c96d06160a49f03eec2a13bd1e43..0000000000000000000000000000000000000000
--- a/spaces/Catmeow/Text_Generation_Fine_Tune/app.py
+++ /dev/null
@@ -1,37 +0,0 @@
-import gradio as gr
-from transformers import pipeline
-
-def generate(text,the_model,max_length,temperature,num_beams,top_k,top_p,repetition_penalty):
- generator = pipeline('text-generation', model=the_model)
- result = generator(text, num_return_sequences=3,
- max_length=max_length,
- temperature=temperature,
- num_beams=num_beams,
- top_k=top_k,
- top_p=top_p,
- repetition_penalty = repetition_penalty,
- no_repeat_ngram_size=2,early_stopping=False)
- return result[0]["generated_text"],result[1]["generated_text"],result[2]["generated_text"]
-
-demo = gr.Interface(
- fn=generate,
- inputs=[
- gr.Textbox(lines=5, label="Input Text"),
- gr.Dropdown(choices=['gpt2','gpt2-medium','gpt2-large','gpt2-xl'],value = 'gpt2',label="Choose model"),
- gr.Slider(value=50,label="Max Length",minimum=1,maximum=1000),
- gr.Slider(value=1.0,label="Temperature",minimum=0.0,maximum=1.0,step=0.05),
- gr.Slider(value=4,label="Num Beams",minimum=2,maximum=6,step=1),
- gr.Slider(value=90,label="Top-k",minimum=0,maximum=100),
- gr.Slider(value=0.9,label="Top-p",minimum=0.1,maximum=1,step=0.05),
- gr.Slider(value=1.1,label="Repetition penalty",minimum=0.2,maximum=2,step=0.1)
-
- ],
- outputs=[
- gr.Textbox(label="Generated Text 1"),
- gr.Textbox(label="Generated Text 2"),
- gr.Textbox(label="Generated Text 3")],
- title = "Text Generator GPT2 Pipeline",
- description = "Text Generator. \n Temperature control randomness, lowering results in less random completions. As approach the zero, the model becomes more repetitive."
-)
-
-demo.launch()
\ No newline at end of file
diff --git a/spaces/ChrisPreston/diff-svc_minato_aqua/README.md b/spaces/ChrisPreston/diff-svc_minato_aqua/README.md
deleted file mode 100644
index 6fd054df4f3c1c10e8e6b69aea6cb892da2b6b04..0000000000000000000000000000000000000000
--- a/spaces/ChrisPreston/diff-svc_minato_aqua/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
----
-title: Diff-svc Minato Aqua
-emoji: 🐨
-colorFrom: green
-colorTo: blue
-sdk: gradio
-sdk_version: 3.17.0
-app_file: app.py
-pinned: false
-license: mit
----
-
-Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
diff --git a/spaces/CoreyMorris/MMLU-by-task-Leaderboard/test_details_data_processing.py b/spaces/CoreyMorris/MMLU-by-task-Leaderboard/test_details_data_processing.py
deleted file mode 100644
index b07f116a1e8b17893e002c61bb21705b0f127ecf..0000000000000000000000000000000000000000
--- a/spaces/CoreyMorris/MMLU-by-task-Leaderboard/test_details_data_processing.py
+++ /dev/null
@@ -1,90 +0,0 @@
-import unittest
-from details_data_processor import DetailsDataProcessor
-import pandas as pd
-import requests
-import os
-
-class TestDetailsDataProcessor(unittest.TestCase):
-
- def setUp(self):
- self.processor = DetailsDataProcessor()
-
- # check that the result is a pandas dataframe
- def test_process_data(self):
- pass
- # data = self.processor.data
- # self.assertIsInstance(data, pd.DataFrame)
-
- def test_download_file(self):
- DetailsDataProcessor.download_file('https://www.google.com', 'test_file_please_remove')
- self.assertTrue(os.path.exists('test.html'))
- os.remove('test.html')
-
- # queries_harness is in the url
- def test_download_file_queries(self):
- file_path_with_error = 'results/shaohang/Sparse0.5_OPT-1.3/results_2023-07-19T19:10:31.005235.json'
- url = self.processor.build_url(file_path_with_error)
- DetailsDataProcessor.download_file(url, 'test_file_please_remove')
-
- # details harness is in the url
- def test_download_file_details(self):
- file_path = 'results/v2ray/LLaMA-2-Wizard-70B-QLoRA/results_2023-08-18T07:09:43.451689.json'
- url = self.processor.build_url(file_path)
- DetailsDataProcessor.download_file(url, 'test_file_please_remove')
-
-
- def test_build_url(self):
- test_cases = [
- ('results/64bits/LexPodLM-13B/results_2023-07-25T13:41:51.227672.json',
- 'https://huggingface.co/datasets/open-llm-leaderboard/details/resolve/main/64bits/LexPodLM-13B/details_harness%7ChendrycksTest-moral_scenarios%7C5_2023-07-25T13%3A41%3A51.227672.json'),
- ('results/AlpinDale/pygmalion-instruct/results_2023-08-17T11:20:15.687659.json',
- 'https://huggingface.co/datasets/open-llm-leaderboard/details/resolve/main/AlpinDale/pygmalion-instruct/details_harness%7ChendrycksTest-moral_scenarios%7C5_2023-08-17T11%3A20%3A15.687659.json')
- ]
-
- for file_path, expected in test_cases:
- assert self.processor.build_url(file_path) == expected, f"Test failed for file_path: {file_path}"
-
- def test_pipeline(self):
- df = self.processor.pipeline()
- print(100 * "****")
- print(df)
- self.assertIsInstance(df, pd.DataFrame)
-
- def test_find_files(self):
- directory = 'results'
- pattern = 'results*.json'
- files = self.processor._find_files(directory, pattern)
- # breakpoint()
- # print(files)
- self.assertIsInstance(files, list)
-
- def test_build_url_harness_types(self):
- test_cases = [
- ('results/shaohang/Sparse0.5_OPT-1.3/results_2023-07-19T19:10:31.005235.json', 'details',
- 'https://huggingface.co/datasets/open-llm-leaderboard/details/resolve/main/shaohang/Sparse0.5_OPT-1.3/details_harness%7ChendrycksTest-moral_scenarios%7C5_2023-07-19T19%3A10%3A31.005235.json'),
- ('results/shaohang/Sparse0.5_OPT-1.3/results_2023-07-19T19:10:31.005235.json', 'queries',
- 'https://huggingface.co/datasets/open-llm-leaderboard/details/resolve/main/shaohang/Sparse0.5_OPT-1.3/queries_harness%7ChendrycksTest-moral_scenarios%7C5_2023-07-19T19%3A10%3A31.005235.json')
- ]
-
- for file_path, harness_type, expected in test_cases:
- self.assertEqual(self.processor.build_url(file_path, harness_type), expected,
- f"Test failed for file_path: {file_path}, harness_type: {harness_type}")
-
- def test_download_file_filename_format(self):
- url = "https://huggingface.co/datasets/open-llm-leaderboard/details/resolve/main/64bits/LexPodLM-13B/details_harness%7ChendrycksTest-moral_scenarios%7C5_2023-07-25T13%3A41%3A51.227672.json"
- directory = 'details_data'
- error_count, success_count = self.processor.download_file(url, directory)
-
- # Check that the download was successful
- self.assertEqual(success_count, 1)
- self.assertEqual(error_count, 0)
-
- # Expected file name
- expected_file_name = "64bits_LexPodLM-13B_moral_scenarios.json"
-
- # Check that the file was created with the expected name
- self.assertTrue(expected_file_name in os.listdir(directory),
- f"File with expected name {expected_file_name} not found in directory {directory}")
-
-if __name__ == '__main__':
- unittest.main()
\ No newline at end of file
diff --git a/spaces/Cyril666/ContourNet-ABI/maskrcnn_benchmark/utils/checkpoint.py b/spaces/Cyril666/ContourNet-ABI/maskrcnn_benchmark/utils/checkpoint.py
deleted file mode 100644
index fdb2293cd99cb78ce97e58ed3493dddf49716033..0000000000000000000000000000000000000000
--- a/spaces/Cyril666/ContourNet-ABI/maskrcnn_benchmark/utils/checkpoint.py
+++ /dev/null
@@ -1,141 +0,0 @@
-# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
-import logging
-import os
-
-import torch
-
-from maskrcnn_benchmark.utils.model_serialization import load_state_dict
-from maskrcnn_benchmark.utils.c2_model_loading import load_c2_format
-from maskrcnn_benchmark.utils.imports import import_file
-from maskrcnn_benchmark.utils.model_zoo import cache_url
-
-
-class Checkpointer(object):
- def __init__(
- self,
- model,
- optimizer=None,
- scheduler=None,
- save_dir="",
- save_to_disk=None,
- logger=None,
- ):
- self.model = model
- self.optimizer = optimizer
- self.scheduler = scheduler
- self.save_dir = save_dir
- self.save_to_disk = save_to_disk
- if logger is None:
- logger = logging.getLogger(__name__)
- self.logger = logger
-
- def save(self, name, **kwargs):
- if not self.save_dir:
- return
-
- if not self.save_to_disk:
- return
-
- data = {}
- data["model"] = self.model.state_dict()
- if self.optimizer is not None:
- data["optimizer"] = self.optimizer.state_dict()
- if self.scheduler is not None:
- data["scheduler"] = self.scheduler.state_dict()
- data.update(kwargs)
-
- save_file = os.path.join(self.save_dir, "{}.pth".format(name))
- self.logger.info("Saving checkpoint to {}".format(save_file))
- torch.save(data, save_file)
- self.tag_last_checkpoint(save_file)
-
- def load(self, f=None):
- if self.has_checkpoint():
- # override argument with existing checkpoint
- f = self.get_checkpoint_file()
- if not f:
- # no checkpoint could be found
- self.logger.info("No checkpoint found. Initializing model from scratch")
- return {}
-
- self.logger.info("Loading checkpoint from {}".format(f))
-
- checkpoint = self._load_file(f)
- self._load_model(checkpoint)
- if "optimizer" in checkpoint and self.optimizer:
- self.logger.info("Loading optimizer from {}".format(f))
- self.optimizer.load_state_dict(checkpoint.pop("optimizer"))
- if "scheduler" in checkpoint and self.scheduler:
- self.logger.info("Loading scheduler from {}".format(f))
- self.scheduler.load_state_dict(checkpoint.pop("scheduler"))
-
- # return any further checkpoint data
- return checkpoint
-
- def has_checkpoint(self):
- save_file = os.path.join(self.save_dir, "last_checkpoint")
- return os.path.exists(save_file)
-
- def get_checkpoint_file(self):
- save_file = os.path.join(self.save_dir, "last_checkpoint")
- try:
- with open(save_file, "r") as f:
- last_saved = f.read()
- last_saved = last_saved.strip()
- except IOError:
- # if file doesn't exist, maybe because it has just been
- # deleted by a separate process
- last_saved = ""
- return last_saved
-
- def tag_last_checkpoint(self, last_filename):
- save_file = os.path.join(self.save_dir, "last_checkpoint")
- with open(save_file, "w") as f:
- f.write(last_filename)
-
- def _load_file(self, f):
- return torch.load(f, map_location=torch.device("cpu"))
-
- def _load_model(self, checkpoint):
- load_state_dict(self.model, checkpoint.pop("model"))
-
-
-class DetectronCheckpointer(Checkpointer):
- def __init__(
- self,
- cfg,
- model,
- optimizer=None,
- scheduler=None,
- save_dir="",
- save_to_disk=None,
- logger=None,
- ):
- super(DetectronCheckpointer, self).__init__(
- model, optimizer, scheduler, save_dir, save_to_disk, logger
- )
- self.cfg = cfg.clone()
-
- def _load_file(self, f):
- # catalog lookup
- if f.startswith("catalog://"):
- paths_catalog = import_file(
- "maskrcnn_benchmark.config.paths_catalog", self.cfg.PATHS_CATALOG, True
- )
- catalog_f = paths_catalog.ModelCatalog.get(f[len("catalog://") :])
- # self.logger.info("{} points to {}".format(f, catalog_f))
- f = catalog_f
- # download url files
- if f.startswith("http"):
- # if the file is a url path, download it and cache it
- cached_f = cache_url(f)
- # self.logger.info("url {} cached in {}".format(f, cached_f))
- f = cached_f
- # convert Caffe2 checkpoint from pkl
- if f.endswith(".pkl"):
- return load_c2_format(self.cfg, f)
- # load native detectron.pytorch checkpoint
- loaded = super(DetectronCheckpointer, self)._load_file(f)
- if "model" not in loaded:
- loaded = dict(model=loaded)
- return loaded
diff --git a/spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/fontTools/unicodedata/Scripts.py b/spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/fontTools/unicodedata/Scripts.py
deleted file mode 100644
index 68bb91b396d62b03a8bfd650c64ce0b7375e1e48..0000000000000000000000000000000000000000
--- a/spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/fontTools/unicodedata/Scripts.py
+++ /dev/null
@@ -1,3509 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# NOTE: This file was auto-generated with MetaTools/buildUCD.py.
-# Source: https://unicode.org/Public/UNIDATA/Scripts.txt
-# License: http://unicode.org/copyright.html#License
-#
-# Scripts-15.0.0.txt
-# Date: 2022-04-26, 23:15:02 GMT
-# © 2022 Unicode®, Inc.
-# Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries.
-# For terms of use, see https://www.unicode.org/terms_of_use.html
-#
-# Unicode Character Database
-# For documentation, see https://www.unicode.org/reports/tr44/
-# For more information, see:
-# UAX #24, Unicode Script Property: https://www.unicode.org/reports/tr24/
-# Especially the sections:
-# https://www.unicode.org/reports/tr24/#Assignment_Script_Values
-# https://www.unicode.org/reports/tr24/#Assignment_ScriptX_Values
-#
-
-
-RANGES = [
- 0x0000, # .. 0x0040 ; Common
- 0x0041, # .. 0x005A ; Latin
- 0x005B, # .. 0x0060 ; Common
- 0x0061, # .. 0x007A ; Latin
- 0x007B, # .. 0x00A9 ; Common
- 0x00AA, # .. 0x00AA ; Latin
- 0x00AB, # .. 0x00B9 ; Common
- 0x00BA, # .. 0x00BA ; Latin
- 0x00BB, # .. 0x00BF ; Common
- 0x00C0, # .. 0x00D6 ; Latin
- 0x00D7, # .. 0x00D7 ; Common
- 0x00D8, # .. 0x00F6 ; Latin
- 0x00F7, # .. 0x00F7 ; Common
- 0x00F8, # .. 0x02B8 ; Latin
- 0x02B9, # .. 0x02DF ; Common
- 0x02E0, # .. 0x02E4 ; Latin
- 0x02E5, # .. 0x02E9 ; Common
- 0x02EA, # .. 0x02EB ; Bopomofo
- 0x02EC, # .. 0x02FF ; Common
- 0x0300, # .. 0x036F ; Inherited
- 0x0370, # .. 0x0373 ; Greek
- 0x0374, # .. 0x0374 ; Common
- 0x0375, # .. 0x0377 ; Greek
- 0x0378, # .. 0x0379 ; Unknown
- 0x037A, # .. 0x037D ; Greek
- 0x037E, # .. 0x037E ; Common
- 0x037F, # .. 0x037F ; Greek
- 0x0380, # .. 0x0383 ; Unknown
- 0x0384, # .. 0x0384 ; Greek
- 0x0385, # .. 0x0385 ; Common
- 0x0386, # .. 0x0386 ; Greek
- 0x0387, # .. 0x0387 ; Common
- 0x0388, # .. 0x038A ; Greek
- 0x038B, # .. 0x038B ; Unknown
- 0x038C, # .. 0x038C ; Greek
- 0x038D, # .. 0x038D ; Unknown
- 0x038E, # .. 0x03A1 ; Greek
- 0x03A2, # .. 0x03A2 ; Unknown
- 0x03A3, # .. 0x03E1 ; Greek
- 0x03E2, # .. 0x03EF ; Coptic
- 0x03F0, # .. 0x03FF ; Greek
- 0x0400, # .. 0x0484 ; Cyrillic
- 0x0485, # .. 0x0486 ; Inherited
- 0x0487, # .. 0x052F ; Cyrillic
- 0x0530, # .. 0x0530 ; Unknown
- 0x0531, # .. 0x0556 ; Armenian
- 0x0557, # .. 0x0558 ; Unknown
- 0x0559, # .. 0x058A ; Armenian
- 0x058B, # .. 0x058C ; Unknown
- 0x058D, # .. 0x058F ; Armenian
- 0x0590, # .. 0x0590 ; Unknown
- 0x0591, # .. 0x05C7 ; Hebrew
- 0x05C8, # .. 0x05CF ; Unknown
- 0x05D0, # .. 0x05EA ; Hebrew
- 0x05EB, # .. 0x05EE ; Unknown
- 0x05EF, # .. 0x05F4 ; Hebrew
- 0x05F5, # .. 0x05FF ; Unknown
- 0x0600, # .. 0x0604 ; Arabic
- 0x0605, # .. 0x0605 ; Common
- 0x0606, # .. 0x060B ; Arabic
- 0x060C, # .. 0x060C ; Common
- 0x060D, # .. 0x061A ; Arabic
- 0x061B, # .. 0x061B ; Common
- 0x061C, # .. 0x061E ; Arabic
- 0x061F, # .. 0x061F ; Common
- 0x0620, # .. 0x063F ; Arabic
- 0x0640, # .. 0x0640 ; Common
- 0x0641, # .. 0x064A ; Arabic
- 0x064B, # .. 0x0655 ; Inherited
- 0x0656, # .. 0x066F ; Arabic
- 0x0670, # .. 0x0670 ; Inherited
- 0x0671, # .. 0x06DC ; Arabic
- 0x06DD, # .. 0x06DD ; Common
- 0x06DE, # .. 0x06FF ; Arabic
- 0x0700, # .. 0x070D ; Syriac
- 0x070E, # .. 0x070E ; Unknown
- 0x070F, # .. 0x074A ; Syriac
- 0x074B, # .. 0x074C ; Unknown
- 0x074D, # .. 0x074F ; Syriac
- 0x0750, # .. 0x077F ; Arabic
- 0x0780, # .. 0x07B1 ; Thaana
- 0x07B2, # .. 0x07BF ; Unknown
- 0x07C0, # .. 0x07FA ; Nko
- 0x07FB, # .. 0x07FC ; Unknown
- 0x07FD, # .. 0x07FF ; Nko
- 0x0800, # .. 0x082D ; Samaritan
- 0x082E, # .. 0x082F ; Unknown
- 0x0830, # .. 0x083E ; Samaritan
- 0x083F, # .. 0x083F ; Unknown
- 0x0840, # .. 0x085B ; Mandaic
- 0x085C, # .. 0x085D ; Unknown
- 0x085E, # .. 0x085E ; Mandaic
- 0x085F, # .. 0x085F ; Unknown
- 0x0860, # .. 0x086A ; Syriac
- 0x086B, # .. 0x086F ; Unknown
- 0x0870, # .. 0x088E ; Arabic
- 0x088F, # .. 0x088F ; Unknown
- 0x0890, # .. 0x0891 ; Arabic
- 0x0892, # .. 0x0897 ; Unknown
- 0x0898, # .. 0x08E1 ; Arabic
- 0x08E2, # .. 0x08E2 ; Common
- 0x08E3, # .. 0x08FF ; Arabic
- 0x0900, # .. 0x0950 ; Devanagari
- 0x0951, # .. 0x0954 ; Inherited
- 0x0955, # .. 0x0963 ; Devanagari
- 0x0964, # .. 0x0965 ; Common
- 0x0966, # .. 0x097F ; Devanagari
- 0x0980, # .. 0x0983 ; Bengali
- 0x0984, # .. 0x0984 ; Unknown
- 0x0985, # .. 0x098C ; Bengali
- 0x098D, # .. 0x098E ; Unknown
- 0x098F, # .. 0x0990 ; Bengali
- 0x0991, # .. 0x0992 ; Unknown
- 0x0993, # .. 0x09A8 ; Bengali
- 0x09A9, # .. 0x09A9 ; Unknown
- 0x09AA, # .. 0x09B0 ; Bengali
- 0x09B1, # .. 0x09B1 ; Unknown
- 0x09B2, # .. 0x09B2 ; Bengali
- 0x09B3, # .. 0x09B5 ; Unknown
- 0x09B6, # .. 0x09B9 ; Bengali
- 0x09BA, # .. 0x09BB ; Unknown
- 0x09BC, # .. 0x09C4 ; Bengali
- 0x09C5, # .. 0x09C6 ; Unknown
- 0x09C7, # .. 0x09C8 ; Bengali
- 0x09C9, # .. 0x09CA ; Unknown
- 0x09CB, # .. 0x09CE ; Bengali
- 0x09CF, # .. 0x09D6 ; Unknown
- 0x09D7, # .. 0x09D7 ; Bengali
- 0x09D8, # .. 0x09DB ; Unknown
- 0x09DC, # .. 0x09DD ; Bengali
- 0x09DE, # .. 0x09DE ; Unknown
- 0x09DF, # .. 0x09E3 ; Bengali
- 0x09E4, # .. 0x09E5 ; Unknown
- 0x09E6, # .. 0x09FE ; Bengali
- 0x09FF, # .. 0x0A00 ; Unknown
- 0x0A01, # .. 0x0A03 ; Gurmukhi
- 0x0A04, # .. 0x0A04 ; Unknown
- 0x0A05, # .. 0x0A0A ; Gurmukhi
- 0x0A0B, # .. 0x0A0E ; Unknown
- 0x0A0F, # .. 0x0A10 ; Gurmukhi
- 0x0A11, # .. 0x0A12 ; Unknown
- 0x0A13, # .. 0x0A28 ; Gurmukhi
- 0x0A29, # .. 0x0A29 ; Unknown
- 0x0A2A, # .. 0x0A30 ; Gurmukhi
- 0x0A31, # .. 0x0A31 ; Unknown
- 0x0A32, # .. 0x0A33 ; Gurmukhi
- 0x0A34, # .. 0x0A34 ; Unknown
- 0x0A35, # .. 0x0A36 ; Gurmukhi
- 0x0A37, # .. 0x0A37 ; Unknown
- 0x0A38, # .. 0x0A39 ; Gurmukhi
- 0x0A3A, # .. 0x0A3B ; Unknown
- 0x0A3C, # .. 0x0A3C ; Gurmukhi
- 0x0A3D, # .. 0x0A3D ; Unknown
- 0x0A3E, # .. 0x0A42 ; Gurmukhi
- 0x0A43, # .. 0x0A46 ; Unknown
- 0x0A47, # .. 0x0A48 ; Gurmukhi
- 0x0A49, # .. 0x0A4A ; Unknown
- 0x0A4B, # .. 0x0A4D ; Gurmukhi
- 0x0A4E, # .. 0x0A50 ; Unknown
- 0x0A51, # .. 0x0A51 ; Gurmukhi
- 0x0A52, # .. 0x0A58 ; Unknown
- 0x0A59, # .. 0x0A5C ; Gurmukhi
- 0x0A5D, # .. 0x0A5D ; Unknown
- 0x0A5E, # .. 0x0A5E ; Gurmukhi
- 0x0A5F, # .. 0x0A65 ; Unknown
- 0x0A66, # .. 0x0A76 ; Gurmukhi
- 0x0A77, # .. 0x0A80 ; Unknown
- 0x0A81, # .. 0x0A83 ; Gujarati
- 0x0A84, # .. 0x0A84 ; Unknown
- 0x0A85, # .. 0x0A8D ; Gujarati
- 0x0A8E, # .. 0x0A8E ; Unknown
- 0x0A8F, # .. 0x0A91 ; Gujarati
- 0x0A92, # .. 0x0A92 ; Unknown
- 0x0A93, # .. 0x0AA8 ; Gujarati
- 0x0AA9, # .. 0x0AA9 ; Unknown
- 0x0AAA, # .. 0x0AB0 ; Gujarati
- 0x0AB1, # .. 0x0AB1 ; Unknown
- 0x0AB2, # .. 0x0AB3 ; Gujarati
- 0x0AB4, # .. 0x0AB4 ; Unknown
- 0x0AB5, # .. 0x0AB9 ; Gujarati
- 0x0ABA, # .. 0x0ABB ; Unknown
- 0x0ABC, # .. 0x0AC5 ; Gujarati
- 0x0AC6, # .. 0x0AC6 ; Unknown
- 0x0AC7, # .. 0x0AC9 ; Gujarati
- 0x0ACA, # .. 0x0ACA ; Unknown
- 0x0ACB, # .. 0x0ACD ; Gujarati
- 0x0ACE, # .. 0x0ACF ; Unknown
- 0x0AD0, # .. 0x0AD0 ; Gujarati
- 0x0AD1, # .. 0x0ADF ; Unknown
- 0x0AE0, # .. 0x0AE3 ; Gujarati
- 0x0AE4, # .. 0x0AE5 ; Unknown
- 0x0AE6, # .. 0x0AF1 ; Gujarati
- 0x0AF2, # .. 0x0AF8 ; Unknown
- 0x0AF9, # .. 0x0AFF ; Gujarati
- 0x0B00, # .. 0x0B00 ; Unknown
- 0x0B01, # .. 0x0B03 ; Oriya
- 0x0B04, # .. 0x0B04 ; Unknown
- 0x0B05, # .. 0x0B0C ; Oriya
- 0x0B0D, # .. 0x0B0E ; Unknown
- 0x0B0F, # .. 0x0B10 ; Oriya
- 0x0B11, # .. 0x0B12 ; Unknown
- 0x0B13, # .. 0x0B28 ; Oriya
- 0x0B29, # .. 0x0B29 ; Unknown
- 0x0B2A, # .. 0x0B30 ; Oriya
- 0x0B31, # .. 0x0B31 ; Unknown
- 0x0B32, # .. 0x0B33 ; Oriya
- 0x0B34, # .. 0x0B34 ; Unknown
- 0x0B35, # .. 0x0B39 ; Oriya
- 0x0B3A, # .. 0x0B3B ; Unknown
- 0x0B3C, # .. 0x0B44 ; Oriya
- 0x0B45, # .. 0x0B46 ; Unknown
- 0x0B47, # .. 0x0B48 ; Oriya
- 0x0B49, # .. 0x0B4A ; Unknown
- 0x0B4B, # .. 0x0B4D ; Oriya
- 0x0B4E, # .. 0x0B54 ; Unknown
- 0x0B55, # .. 0x0B57 ; Oriya
- 0x0B58, # .. 0x0B5B ; Unknown
- 0x0B5C, # .. 0x0B5D ; Oriya
- 0x0B5E, # .. 0x0B5E ; Unknown
- 0x0B5F, # .. 0x0B63 ; Oriya
- 0x0B64, # .. 0x0B65 ; Unknown
- 0x0B66, # .. 0x0B77 ; Oriya
- 0x0B78, # .. 0x0B81 ; Unknown
- 0x0B82, # .. 0x0B83 ; Tamil
- 0x0B84, # .. 0x0B84 ; Unknown
- 0x0B85, # .. 0x0B8A ; Tamil
- 0x0B8B, # .. 0x0B8D ; Unknown
- 0x0B8E, # .. 0x0B90 ; Tamil
- 0x0B91, # .. 0x0B91 ; Unknown
- 0x0B92, # .. 0x0B95 ; Tamil
- 0x0B96, # .. 0x0B98 ; Unknown
- 0x0B99, # .. 0x0B9A ; Tamil
- 0x0B9B, # .. 0x0B9B ; Unknown
- 0x0B9C, # .. 0x0B9C ; Tamil
- 0x0B9D, # .. 0x0B9D ; Unknown
- 0x0B9E, # .. 0x0B9F ; Tamil
- 0x0BA0, # .. 0x0BA2 ; Unknown
- 0x0BA3, # .. 0x0BA4 ; Tamil
- 0x0BA5, # .. 0x0BA7 ; Unknown
- 0x0BA8, # .. 0x0BAA ; Tamil
- 0x0BAB, # .. 0x0BAD ; Unknown
- 0x0BAE, # .. 0x0BB9 ; Tamil
- 0x0BBA, # .. 0x0BBD ; Unknown
- 0x0BBE, # .. 0x0BC2 ; Tamil
- 0x0BC3, # .. 0x0BC5 ; Unknown
- 0x0BC6, # .. 0x0BC8 ; Tamil
- 0x0BC9, # .. 0x0BC9 ; Unknown
- 0x0BCA, # .. 0x0BCD ; Tamil
- 0x0BCE, # .. 0x0BCF ; Unknown
- 0x0BD0, # .. 0x0BD0 ; Tamil
- 0x0BD1, # .. 0x0BD6 ; Unknown
- 0x0BD7, # .. 0x0BD7 ; Tamil
- 0x0BD8, # .. 0x0BE5 ; Unknown
- 0x0BE6, # .. 0x0BFA ; Tamil
- 0x0BFB, # .. 0x0BFF ; Unknown
- 0x0C00, # .. 0x0C0C ; Telugu
- 0x0C0D, # .. 0x0C0D ; Unknown
- 0x0C0E, # .. 0x0C10 ; Telugu
- 0x0C11, # .. 0x0C11 ; Unknown
- 0x0C12, # .. 0x0C28 ; Telugu
- 0x0C29, # .. 0x0C29 ; Unknown
- 0x0C2A, # .. 0x0C39 ; Telugu
- 0x0C3A, # .. 0x0C3B ; Unknown
- 0x0C3C, # .. 0x0C44 ; Telugu
- 0x0C45, # .. 0x0C45 ; Unknown
- 0x0C46, # .. 0x0C48 ; Telugu
- 0x0C49, # .. 0x0C49 ; Unknown
- 0x0C4A, # .. 0x0C4D ; Telugu
- 0x0C4E, # .. 0x0C54 ; Unknown
- 0x0C55, # .. 0x0C56 ; Telugu
- 0x0C57, # .. 0x0C57 ; Unknown
- 0x0C58, # .. 0x0C5A ; Telugu
- 0x0C5B, # .. 0x0C5C ; Unknown
- 0x0C5D, # .. 0x0C5D ; Telugu
- 0x0C5E, # .. 0x0C5F ; Unknown
- 0x0C60, # .. 0x0C63 ; Telugu
- 0x0C64, # .. 0x0C65 ; Unknown
- 0x0C66, # .. 0x0C6F ; Telugu
- 0x0C70, # .. 0x0C76 ; Unknown
- 0x0C77, # .. 0x0C7F ; Telugu
- 0x0C80, # .. 0x0C8C ; Kannada
- 0x0C8D, # .. 0x0C8D ; Unknown
- 0x0C8E, # .. 0x0C90 ; Kannada
- 0x0C91, # .. 0x0C91 ; Unknown
- 0x0C92, # .. 0x0CA8 ; Kannada
- 0x0CA9, # .. 0x0CA9 ; Unknown
- 0x0CAA, # .. 0x0CB3 ; Kannada
- 0x0CB4, # .. 0x0CB4 ; Unknown
- 0x0CB5, # .. 0x0CB9 ; Kannada
- 0x0CBA, # .. 0x0CBB ; Unknown
- 0x0CBC, # .. 0x0CC4 ; Kannada
- 0x0CC5, # .. 0x0CC5 ; Unknown
- 0x0CC6, # .. 0x0CC8 ; Kannada
- 0x0CC9, # .. 0x0CC9 ; Unknown
- 0x0CCA, # .. 0x0CCD ; Kannada
- 0x0CCE, # .. 0x0CD4 ; Unknown
- 0x0CD5, # .. 0x0CD6 ; Kannada
- 0x0CD7, # .. 0x0CDC ; Unknown
- 0x0CDD, # .. 0x0CDE ; Kannada
- 0x0CDF, # .. 0x0CDF ; Unknown
- 0x0CE0, # .. 0x0CE3 ; Kannada
- 0x0CE4, # .. 0x0CE5 ; Unknown
- 0x0CE6, # .. 0x0CEF ; Kannada
- 0x0CF0, # .. 0x0CF0 ; Unknown
- 0x0CF1, # .. 0x0CF3 ; Kannada
- 0x0CF4, # .. 0x0CFF ; Unknown
- 0x0D00, # .. 0x0D0C ; Malayalam
- 0x0D0D, # .. 0x0D0D ; Unknown
- 0x0D0E, # .. 0x0D10 ; Malayalam
- 0x0D11, # .. 0x0D11 ; Unknown
- 0x0D12, # .. 0x0D44 ; Malayalam
- 0x0D45, # .. 0x0D45 ; Unknown
- 0x0D46, # .. 0x0D48 ; Malayalam
- 0x0D49, # .. 0x0D49 ; Unknown
- 0x0D4A, # .. 0x0D4F ; Malayalam
- 0x0D50, # .. 0x0D53 ; Unknown
- 0x0D54, # .. 0x0D63 ; Malayalam
- 0x0D64, # .. 0x0D65 ; Unknown
- 0x0D66, # .. 0x0D7F ; Malayalam
- 0x0D80, # .. 0x0D80 ; Unknown
- 0x0D81, # .. 0x0D83 ; Sinhala
- 0x0D84, # .. 0x0D84 ; Unknown
- 0x0D85, # .. 0x0D96 ; Sinhala
- 0x0D97, # .. 0x0D99 ; Unknown
- 0x0D9A, # .. 0x0DB1 ; Sinhala
- 0x0DB2, # .. 0x0DB2 ; Unknown
- 0x0DB3, # .. 0x0DBB ; Sinhala
- 0x0DBC, # .. 0x0DBC ; Unknown
- 0x0DBD, # .. 0x0DBD ; Sinhala
- 0x0DBE, # .. 0x0DBF ; Unknown
- 0x0DC0, # .. 0x0DC6 ; Sinhala
- 0x0DC7, # .. 0x0DC9 ; Unknown
- 0x0DCA, # .. 0x0DCA ; Sinhala
- 0x0DCB, # .. 0x0DCE ; Unknown
- 0x0DCF, # .. 0x0DD4 ; Sinhala
- 0x0DD5, # .. 0x0DD5 ; Unknown
- 0x0DD6, # .. 0x0DD6 ; Sinhala
- 0x0DD7, # .. 0x0DD7 ; Unknown
- 0x0DD8, # .. 0x0DDF ; Sinhala
- 0x0DE0, # .. 0x0DE5 ; Unknown
- 0x0DE6, # .. 0x0DEF ; Sinhala
- 0x0DF0, # .. 0x0DF1 ; Unknown
- 0x0DF2, # .. 0x0DF4 ; Sinhala
- 0x0DF5, # .. 0x0E00 ; Unknown
- 0x0E01, # .. 0x0E3A ; Thai
- 0x0E3B, # .. 0x0E3E ; Unknown
- 0x0E3F, # .. 0x0E3F ; Common
- 0x0E40, # .. 0x0E5B ; Thai
- 0x0E5C, # .. 0x0E80 ; Unknown
- 0x0E81, # .. 0x0E82 ; Lao
- 0x0E83, # .. 0x0E83 ; Unknown
- 0x0E84, # .. 0x0E84 ; Lao
- 0x0E85, # .. 0x0E85 ; Unknown
- 0x0E86, # .. 0x0E8A ; Lao
- 0x0E8B, # .. 0x0E8B ; Unknown
- 0x0E8C, # .. 0x0EA3 ; Lao
- 0x0EA4, # .. 0x0EA4 ; Unknown
- 0x0EA5, # .. 0x0EA5 ; Lao
- 0x0EA6, # .. 0x0EA6 ; Unknown
- 0x0EA7, # .. 0x0EBD ; Lao
- 0x0EBE, # .. 0x0EBF ; Unknown
- 0x0EC0, # .. 0x0EC4 ; Lao
- 0x0EC5, # .. 0x0EC5 ; Unknown
- 0x0EC6, # .. 0x0EC6 ; Lao
- 0x0EC7, # .. 0x0EC7 ; Unknown
- 0x0EC8, # .. 0x0ECE ; Lao
- 0x0ECF, # .. 0x0ECF ; Unknown
- 0x0ED0, # .. 0x0ED9 ; Lao
- 0x0EDA, # .. 0x0EDB ; Unknown
- 0x0EDC, # .. 0x0EDF ; Lao
- 0x0EE0, # .. 0x0EFF ; Unknown
- 0x0F00, # .. 0x0F47 ; Tibetan
- 0x0F48, # .. 0x0F48 ; Unknown
- 0x0F49, # .. 0x0F6C ; Tibetan
- 0x0F6D, # .. 0x0F70 ; Unknown
- 0x0F71, # .. 0x0F97 ; Tibetan
- 0x0F98, # .. 0x0F98 ; Unknown
- 0x0F99, # .. 0x0FBC ; Tibetan
- 0x0FBD, # .. 0x0FBD ; Unknown
- 0x0FBE, # .. 0x0FCC ; Tibetan
- 0x0FCD, # .. 0x0FCD ; Unknown
- 0x0FCE, # .. 0x0FD4 ; Tibetan
- 0x0FD5, # .. 0x0FD8 ; Common
- 0x0FD9, # .. 0x0FDA ; Tibetan
- 0x0FDB, # .. 0x0FFF ; Unknown
- 0x1000, # .. 0x109F ; Myanmar
- 0x10A0, # .. 0x10C5 ; Georgian
- 0x10C6, # .. 0x10C6 ; Unknown
- 0x10C7, # .. 0x10C7 ; Georgian
- 0x10C8, # .. 0x10CC ; Unknown
- 0x10CD, # .. 0x10CD ; Georgian
- 0x10CE, # .. 0x10CF ; Unknown
- 0x10D0, # .. 0x10FA ; Georgian
- 0x10FB, # .. 0x10FB ; Common
- 0x10FC, # .. 0x10FF ; Georgian
- 0x1100, # .. 0x11FF ; Hangul
- 0x1200, # .. 0x1248 ; Ethiopic
- 0x1249, # .. 0x1249 ; Unknown
- 0x124A, # .. 0x124D ; Ethiopic
- 0x124E, # .. 0x124F ; Unknown
- 0x1250, # .. 0x1256 ; Ethiopic
- 0x1257, # .. 0x1257 ; Unknown
- 0x1258, # .. 0x1258 ; Ethiopic
- 0x1259, # .. 0x1259 ; Unknown
- 0x125A, # .. 0x125D ; Ethiopic
- 0x125E, # .. 0x125F ; Unknown
- 0x1260, # .. 0x1288 ; Ethiopic
- 0x1289, # .. 0x1289 ; Unknown
- 0x128A, # .. 0x128D ; Ethiopic
- 0x128E, # .. 0x128F ; Unknown
- 0x1290, # .. 0x12B0 ; Ethiopic
- 0x12B1, # .. 0x12B1 ; Unknown
- 0x12B2, # .. 0x12B5 ; Ethiopic
- 0x12B6, # .. 0x12B7 ; Unknown
- 0x12B8, # .. 0x12BE ; Ethiopic
- 0x12BF, # .. 0x12BF ; Unknown
- 0x12C0, # .. 0x12C0 ; Ethiopic
- 0x12C1, # .. 0x12C1 ; Unknown
- 0x12C2, # .. 0x12C5 ; Ethiopic
- 0x12C6, # .. 0x12C7 ; Unknown
- 0x12C8, # .. 0x12D6 ; Ethiopic
- 0x12D7, # .. 0x12D7 ; Unknown
- 0x12D8, # .. 0x1310 ; Ethiopic
- 0x1311, # .. 0x1311 ; Unknown
- 0x1312, # .. 0x1315 ; Ethiopic
- 0x1316, # .. 0x1317 ; Unknown
- 0x1318, # .. 0x135A ; Ethiopic
- 0x135B, # .. 0x135C ; Unknown
- 0x135D, # .. 0x137C ; Ethiopic
- 0x137D, # .. 0x137F ; Unknown
- 0x1380, # .. 0x1399 ; Ethiopic
- 0x139A, # .. 0x139F ; Unknown
- 0x13A0, # .. 0x13F5 ; Cherokee
- 0x13F6, # .. 0x13F7 ; Unknown
- 0x13F8, # .. 0x13FD ; Cherokee
- 0x13FE, # .. 0x13FF ; Unknown
- 0x1400, # .. 0x167F ; Canadian_Aboriginal
- 0x1680, # .. 0x169C ; Ogham
- 0x169D, # .. 0x169F ; Unknown
- 0x16A0, # .. 0x16EA ; Runic
- 0x16EB, # .. 0x16ED ; Common
- 0x16EE, # .. 0x16F8 ; Runic
- 0x16F9, # .. 0x16FF ; Unknown
- 0x1700, # .. 0x1715 ; Tagalog
- 0x1716, # .. 0x171E ; Unknown
- 0x171F, # .. 0x171F ; Tagalog
- 0x1720, # .. 0x1734 ; Hanunoo
- 0x1735, # .. 0x1736 ; Common
- 0x1737, # .. 0x173F ; Unknown
- 0x1740, # .. 0x1753 ; Buhid
- 0x1754, # .. 0x175F ; Unknown
- 0x1760, # .. 0x176C ; Tagbanwa
- 0x176D, # .. 0x176D ; Unknown
- 0x176E, # .. 0x1770 ; Tagbanwa
- 0x1771, # .. 0x1771 ; Unknown
- 0x1772, # .. 0x1773 ; Tagbanwa
- 0x1774, # .. 0x177F ; Unknown
- 0x1780, # .. 0x17DD ; Khmer
- 0x17DE, # .. 0x17DF ; Unknown
- 0x17E0, # .. 0x17E9 ; Khmer
- 0x17EA, # .. 0x17EF ; Unknown
- 0x17F0, # .. 0x17F9 ; Khmer
- 0x17FA, # .. 0x17FF ; Unknown
- 0x1800, # .. 0x1801 ; Mongolian
- 0x1802, # .. 0x1803 ; Common
- 0x1804, # .. 0x1804 ; Mongolian
- 0x1805, # .. 0x1805 ; Common
- 0x1806, # .. 0x1819 ; Mongolian
- 0x181A, # .. 0x181F ; Unknown
- 0x1820, # .. 0x1878 ; Mongolian
- 0x1879, # .. 0x187F ; Unknown
- 0x1880, # .. 0x18AA ; Mongolian
- 0x18AB, # .. 0x18AF ; Unknown
- 0x18B0, # .. 0x18F5 ; Canadian_Aboriginal
- 0x18F6, # .. 0x18FF ; Unknown
- 0x1900, # .. 0x191E ; Limbu
- 0x191F, # .. 0x191F ; Unknown
- 0x1920, # .. 0x192B ; Limbu
- 0x192C, # .. 0x192F ; Unknown
- 0x1930, # .. 0x193B ; Limbu
- 0x193C, # .. 0x193F ; Unknown
- 0x1940, # .. 0x1940 ; Limbu
- 0x1941, # .. 0x1943 ; Unknown
- 0x1944, # .. 0x194F ; Limbu
- 0x1950, # .. 0x196D ; Tai_Le
- 0x196E, # .. 0x196F ; Unknown
- 0x1970, # .. 0x1974 ; Tai_Le
- 0x1975, # .. 0x197F ; Unknown
- 0x1980, # .. 0x19AB ; New_Tai_Lue
- 0x19AC, # .. 0x19AF ; Unknown
- 0x19B0, # .. 0x19C9 ; New_Tai_Lue
- 0x19CA, # .. 0x19CF ; Unknown
- 0x19D0, # .. 0x19DA ; New_Tai_Lue
- 0x19DB, # .. 0x19DD ; Unknown
- 0x19DE, # .. 0x19DF ; New_Tai_Lue
- 0x19E0, # .. 0x19FF ; Khmer
- 0x1A00, # .. 0x1A1B ; Buginese
- 0x1A1C, # .. 0x1A1D ; Unknown
- 0x1A1E, # .. 0x1A1F ; Buginese
- 0x1A20, # .. 0x1A5E ; Tai_Tham
- 0x1A5F, # .. 0x1A5F ; Unknown
- 0x1A60, # .. 0x1A7C ; Tai_Tham
- 0x1A7D, # .. 0x1A7E ; Unknown
- 0x1A7F, # .. 0x1A89 ; Tai_Tham
- 0x1A8A, # .. 0x1A8F ; Unknown
- 0x1A90, # .. 0x1A99 ; Tai_Tham
- 0x1A9A, # .. 0x1A9F ; Unknown
- 0x1AA0, # .. 0x1AAD ; Tai_Tham
- 0x1AAE, # .. 0x1AAF ; Unknown
- 0x1AB0, # .. 0x1ACE ; Inherited
- 0x1ACF, # .. 0x1AFF ; Unknown
- 0x1B00, # .. 0x1B4C ; Balinese
- 0x1B4D, # .. 0x1B4F ; Unknown
- 0x1B50, # .. 0x1B7E ; Balinese
- 0x1B7F, # .. 0x1B7F ; Unknown
- 0x1B80, # .. 0x1BBF ; Sundanese
- 0x1BC0, # .. 0x1BF3 ; Batak
- 0x1BF4, # .. 0x1BFB ; Unknown
- 0x1BFC, # .. 0x1BFF ; Batak
- 0x1C00, # .. 0x1C37 ; Lepcha
- 0x1C38, # .. 0x1C3A ; Unknown
- 0x1C3B, # .. 0x1C49 ; Lepcha
- 0x1C4A, # .. 0x1C4C ; Unknown
- 0x1C4D, # .. 0x1C4F ; Lepcha
- 0x1C50, # .. 0x1C7F ; Ol_Chiki
- 0x1C80, # .. 0x1C88 ; Cyrillic
- 0x1C89, # .. 0x1C8F ; Unknown
- 0x1C90, # .. 0x1CBA ; Georgian
- 0x1CBB, # .. 0x1CBC ; Unknown
- 0x1CBD, # .. 0x1CBF ; Georgian
- 0x1CC0, # .. 0x1CC7 ; Sundanese
- 0x1CC8, # .. 0x1CCF ; Unknown
- 0x1CD0, # .. 0x1CD2 ; Inherited
- 0x1CD3, # .. 0x1CD3 ; Common
- 0x1CD4, # .. 0x1CE0 ; Inherited
- 0x1CE1, # .. 0x1CE1 ; Common
- 0x1CE2, # .. 0x1CE8 ; Inherited
- 0x1CE9, # .. 0x1CEC ; Common
- 0x1CED, # .. 0x1CED ; Inherited
- 0x1CEE, # .. 0x1CF3 ; Common
- 0x1CF4, # .. 0x1CF4 ; Inherited
- 0x1CF5, # .. 0x1CF7 ; Common
- 0x1CF8, # .. 0x1CF9 ; Inherited
- 0x1CFA, # .. 0x1CFA ; Common
- 0x1CFB, # .. 0x1CFF ; Unknown
- 0x1D00, # .. 0x1D25 ; Latin
- 0x1D26, # .. 0x1D2A ; Greek
- 0x1D2B, # .. 0x1D2B ; Cyrillic
- 0x1D2C, # .. 0x1D5C ; Latin
- 0x1D5D, # .. 0x1D61 ; Greek
- 0x1D62, # .. 0x1D65 ; Latin
- 0x1D66, # .. 0x1D6A ; Greek
- 0x1D6B, # .. 0x1D77 ; Latin
- 0x1D78, # .. 0x1D78 ; Cyrillic
- 0x1D79, # .. 0x1DBE ; Latin
- 0x1DBF, # .. 0x1DBF ; Greek
- 0x1DC0, # .. 0x1DFF ; Inherited
- 0x1E00, # .. 0x1EFF ; Latin
- 0x1F00, # .. 0x1F15 ; Greek
- 0x1F16, # .. 0x1F17 ; Unknown
- 0x1F18, # .. 0x1F1D ; Greek
- 0x1F1E, # .. 0x1F1F ; Unknown
- 0x1F20, # .. 0x1F45 ; Greek
- 0x1F46, # .. 0x1F47 ; Unknown
- 0x1F48, # .. 0x1F4D ; Greek
- 0x1F4E, # .. 0x1F4F ; Unknown
- 0x1F50, # .. 0x1F57 ; Greek
- 0x1F58, # .. 0x1F58 ; Unknown
- 0x1F59, # .. 0x1F59 ; Greek
- 0x1F5A, # .. 0x1F5A ; Unknown
- 0x1F5B, # .. 0x1F5B ; Greek
- 0x1F5C, # .. 0x1F5C ; Unknown
- 0x1F5D, # .. 0x1F5D ; Greek
- 0x1F5E, # .. 0x1F5E ; Unknown
- 0x1F5F, # .. 0x1F7D ; Greek
- 0x1F7E, # .. 0x1F7F ; Unknown
- 0x1F80, # .. 0x1FB4 ; Greek
- 0x1FB5, # .. 0x1FB5 ; Unknown
- 0x1FB6, # .. 0x1FC4 ; Greek
- 0x1FC5, # .. 0x1FC5 ; Unknown
- 0x1FC6, # .. 0x1FD3 ; Greek
- 0x1FD4, # .. 0x1FD5 ; Unknown
- 0x1FD6, # .. 0x1FDB ; Greek
- 0x1FDC, # .. 0x1FDC ; Unknown
- 0x1FDD, # .. 0x1FEF ; Greek
- 0x1FF0, # .. 0x1FF1 ; Unknown
- 0x1FF2, # .. 0x1FF4 ; Greek
- 0x1FF5, # .. 0x1FF5 ; Unknown
- 0x1FF6, # .. 0x1FFE ; Greek
- 0x1FFF, # .. 0x1FFF ; Unknown
- 0x2000, # .. 0x200B ; Common
- 0x200C, # .. 0x200D ; Inherited
- 0x200E, # .. 0x2064 ; Common
- 0x2065, # .. 0x2065 ; Unknown
- 0x2066, # .. 0x2070 ; Common
- 0x2071, # .. 0x2071 ; Latin
- 0x2072, # .. 0x2073 ; Unknown
- 0x2074, # .. 0x207E ; Common
- 0x207F, # .. 0x207F ; Latin
- 0x2080, # .. 0x208E ; Common
- 0x208F, # .. 0x208F ; Unknown
- 0x2090, # .. 0x209C ; Latin
- 0x209D, # .. 0x209F ; Unknown
- 0x20A0, # .. 0x20C0 ; Common
- 0x20C1, # .. 0x20CF ; Unknown
- 0x20D0, # .. 0x20F0 ; Inherited
- 0x20F1, # .. 0x20FF ; Unknown
- 0x2100, # .. 0x2125 ; Common
- 0x2126, # .. 0x2126 ; Greek
- 0x2127, # .. 0x2129 ; Common
- 0x212A, # .. 0x212B ; Latin
- 0x212C, # .. 0x2131 ; Common
- 0x2132, # .. 0x2132 ; Latin
- 0x2133, # .. 0x214D ; Common
- 0x214E, # .. 0x214E ; Latin
- 0x214F, # .. 0x215F ; Common
- 0x2160, # .. 0x2188 ; Latin
- 0x2189, # .. 0x218B ; Common
- 0x218C, # .. 0x218F ; Unknown
- 0x2190, # .. 0x2426 ; Common
- 0x2427, # .. 0x243F ; Unknown
- 0x2440, # .. 0x244A ; Common
- 0x244B, # .. 0x245F ; Unknown
- 0x2460, # .. 0x27FF ; Common
- 0x2800, # .. 0x28FF ; Braille
- 0x2900, # .. 0x2B73 ; Common
- 0x2B74, # .. 0x2B75 ; Unknown
- 0x2B76, # .. 0x2B95 ; Common
- 0x2B96, # .. 0x2B96 ; Unknown
- 0x2B97, # .. 0x2BFF ; Common
- 0x2C00, # .. 0x2C5F ; Glagolitic
- 0x2C60, # .. 0x2C7F ; Latin
- 0x2C80, # .. 0x2CF3 ; Coptic
- 0x2CF4, # .. 0x2CF8 ; Unknown
- 0x2CF9, # .. 0x2CFF ; Coptic
- 0x2D00, # .. 0x2D25 ; Georgian
- 0x2D26, # .. 0x2D26 ; Unknown
- 0x2D27, # .. 0x2D27 ; Georgian
- 0x2D28, # .. 0x2D2C ; Unknown
- 0x2D2D, # .. 0x2D2D ; Georgian
- 0x2D2E, # .. 0x2D2F ; Unknown
- 0x2D30, # .. 0x2D67 ; Tifinagh
- 0x2D68, # .. 0x2D6E ; Unknown
- 0x2D6F, # .. 0x2D70 ; Tifinagh
- 0x2D71, # .. 0x2D7E ; Unknown
- 0x2D7F, # .. 0x2D7F ; Tifinagh
- 0x2D80, # .. 0x2D96 ; Ethiopic
- 0x2D97, # .. 0x2D9F ; Unknown
- 0x2DA0, # .. 0x2DA6 ; Ethiopic
- 0x2DA7, # .. 0x2DA7 ; Unknown
- 0x2DA8, # .. 0x2DAE ; Ethiopic
- 0x2DAF, # .. 0x2DAF ; Unknown
- 0x2DB0, # .. 0x2DB6 ; Ethiopic
- 0x2DB7, # .. 0x2DB7 ; Unknown
- 0x2DB8, # .. 0x2DBE ; Ethiopic
- 0x2DBF, # .. 0x2DBF ; Unknown
- 0x2DC0, # .. 0x2DC6 ; Ethiopic
- 0x2DC7, # .. 0x2DC7 ; Unknown
- 0x2DC8, # .. 0x2DCE ; Ethiopic
- 0x2DCF, # .. 0x2DCF ; Unknown
- 0x2DD0, # .. 0x2DD6 ; Ethiopic
- 0x2DD7, # .. 0x2DD7 ; Unknown
- 0x2DD8, # .. 0x2DDE ; Ethiopic
- 0x2DDF, # .. 0x2DDF ; Unknown
- 0x2DE0, # .. 0x2DFF ; Cyrillic
- 0x2E00, # .. 0x2E5D ; Common
- 0x2E5E, # .. 0x2E7F ; Unknown
- 0x2E80, # .. 0x2E99 ; Han
- 0x2E9A, # .. 0x2E9A ; Unknown
- 0x2E9B, # .. 0x2EF3 ; Han
- 0x2EF4, # .. 0x2EFF ; Unknown
- 0x2F00, # .. 0x2FD5 ; Han
- 0x2FD6, # .. 0x2FEF ; Unknown
- 0x2FF0, # .. 0x2FFB ; Common
- 0x2FFC, # .. 0x2FFF ; Unknown
- 0x3000, # .. 0x3004 ; Common
- 0x3005, # .. 0x3005 ; Han
- 0x3006, # .. 0x3006 ; Common
- 0x3007, # .. 0x3007 ; Han
- 0x3008, # .. 0x3020 ; Common
- 0x3021, # .. 0x3029 ; Han
- 0x302A, # .. 0x302D ; Inherited
- 0x302E, # .. 0x302F ; Hangul
- 0x3030, # .. 0x3037 ; Common
- 0x3038, # .. 0x303B ; Han
- 0x303C, # .. 0x303F ; Common
- 0x3040, # .. 0x3040 ; Unknown
- 0x3041, # .. 0x3096 ; Hiragana
- 0x3097, # .. 0x3098 ; Unknown
- 0x3099, # .. 0x309A ; Inherited
- 0x309B, # .. 0x309C ; Common
- 0x309D, # .. 0x309F ; Hiragana
- 0x30A0, # .. 0x30A0 ; Common
- 0x30A1, # .. 0x30FA ; Katakana
- 0x30FB, # .. 0x30FC ; Common
- 0x30FD, # .. 0x30FF ; Katakana
- 0x3100, # .. 0x3104 ; Unknown
- 0x3105, # .. 0x312F ; Bopomofo
- 0x3130, # .. 0x3130 ; Unknown
- 0x3131, # .. 0x318E ; Hangul
- 0x318F, # .. 0x318F ; Unknown
- 0x3190, # .. 0x319F ; Common
- 0x31A0, # .. 0x31BF ; Bopomofo
- 0x31C0, # .. 0x31E3 ; Common
- 0x31E4, # .. 0x31EF ; Unknown
- 0x31F0, # .. 0x31FF ; Katakana
- 0x3200, # .. 0x321E ; Hangul
- 0x321F, # .. 0x321F ; Unknown
- 0x3220, # .. 0x325F ; Common
- 0x3260, # .. 0x327E ; Hangul
- 0x327F, # .. 0x32CF ; Common
- 0x32D0, # .. 0x32FE ; Katakana
- 0x32FF, # .. 0x32FF ; Common
- 0x3300, # .. 0x3357 ; Katakana
- 0x3358, # .. 0x33FF ; Common
- 0x3400, # .. 0x4DBF ; Han
- 0x4DC0, # .. 0x4DFF ; Common
- 0x4E00, # .. 0x9FFF ; Han
- 0xA000, # .. 0xA48C ; Yi
- 0xA48D, # .. 0xA48F ; Unknown
- 0xA490, # .. 0xA4C6 ; Yi
- 0xA4C7, # .. 0xA4CF ; Unknown
- 0xA4D0, # .. 0xA4FF ; Lisu
- 0xA500, # .. 0xA62B ; Vai
- 0xA62C, # .. 0xA63F ; Unknown
- 0xA640, # .. 0xA69F ; Cyrillic
- 0xA6A0, # .. 0xA6F7 ; Bamum
- 0xA6F8, # .. 0xA6FF ; Unknown
- 0xA700, # .. 0xA721 ; Common
- 0xA722, # .. 0xA787 ; Latin
- 0xA788, # .. 0xA78A ; Common
- 0xA78B, # .. 0xA7CA ; Latin
- 0xA7CB, # .. 0xA7CF ; Unknown
- 0xA7D0, # .. 0xA7D1 ; Latin
- 0xA7D2, # .. 0xA7D2 ; Unknown
- 0xA7D3, # .. 0xA7D3 ; Latin
- 0xA7D4, # .. 0xA7D4 ; Unknown
- 0xA7D5, # .. 0xA7D9 ; Latin
- 0xA7DA, # .. 0xA7F1 ; Unknown
- 0xA7F2, # .. 0xA7FF ; Latin
- 0xA800, # .. 0xA82C ; Syloti_Nagri
- 0xA82D, # .. 0xA82F ; Unknown
- 0xA830, # .. 0xA839 ; Common
- 0xA83A, # .. 0xA83F ; Unknown
- 0xA840, # .. 0xA877 ; Phags_Pa
- 0xA878, # .. 0xA87F ; Unknown
- 0xA880, # .. 0xA8C5 ; Saurashtra
- 0xA8C6, # .. 0xA8CD ; Unknown
- 0xA8CE, # .. 0xA8D9 ; Saurashtra
- 0xA8DA, # .. 0xA8DF ; Unknown
- 0xA8E0, # .. 0xA8FF ; Devanagari
- 0xA900, # .. 0xA92D ; Kayah_Li
- 0xA92E, # .. 0xA92E ; Common
- 0xA92F, # .. 0xA92F ; Kayah_Li
- 0xA930, # .. 0xA953 ; Rejang
- 0xA954, # .. 0xA95E ; Unknown
- 0xA95F, # .. 0xA95F ; Rejang
- 0xA960, # .. 0xA97C ; Hangul
- 0xA97D, # .. 0xA97F ; Unknown
- 0xA980, # .. 0xA9CD ; Javanese
- 0xA9CE, # .. 0xA9CE ; Unknown
- 0xA9CF, # .. 0xA9CF ; Common
- 0xA9D0, # .. 0xA9D9 ; Javanese
- 0xA9DA, # .. 0xA9DD ; Unknown
- 0xA9DE, # .. 0xA9DF ; Javanese
- 0xA9E0, # .. 0xA9FE ; Myanmar
- 0xA9FF, # .. 0xA9FF ; Unknown
- 0xAA00, # .. 0xAA36 ; Cham
- 0xAA37, # .. 0xAA3F ; Unknown
- 0xAA40, # .. 0xAA4D ; Cham
- 0xAA4E, # .. 0xAA4F ; Unknown
- 0xAA50, # .. 0xAA59 ; Cham
- 0xAA5A, # .. 0xAA5B ; Unknown
- 0xAA5C, # .. 0xAA5F ; Cham
- 0xAA60, # .. 0xAA7F ; Myanmar
- 0xAA80, # .. 0xAAC2 ; Tai_Viet
- 0xAAC3, # .. 0xAADA ; Unknown
- 0xAADB, # .. 0xAADF ; Tai_Viet
- 0xAAE0, # .. 0xAAF6 ; Meetei_Mayek
- 0xAAF7, # .. 0xAB00 ; Unknown
- 0xAB01, # .. 0xAB06 ; Ethiopic
- 0xAB07, # .. 0xAB08 ; Unknown
- 0xAB09, # .. 0xAB0E ; Ethiopic
- 0xAB0F, # .. 0xAB10 ; Unknown
- 0xAB11, # .. 0xAB16 ; Ethiopic
- 0xAB17, # .. 0xAB1F ; Unknown
- 0xAB20, # .. 0xAB26 ; Ethiopic
- 0xAB27, # .. 0xAB27 ; Unknown
- 0xAB28, # .. 0xAB2E ; Ethiopic
- 0xAB2F, # .. 0xAB2F ; Unknown
- 0xAB30, # .. 0xAB5A ; Latin
- 0xAB5B, # .. 0xAB5B ; Common
- 0xAB5C, # .. 0xAB64 ; Latin
- 0xAB65, # .. 0xAB65 ; Greek
- 0xAB66, # .. 0xAB69 ; Latin
- 0xAB6A, # .. 0xAB6B ; Common
- 0xAB6C, # .. 0xAB6F ; Unknown
- 0xAB70, # .. 0xABBF ; Cherokee
- 0xABC0, # .. 0xABED ; Meetei_Mayek
- 0xABEE, # .. 0xABEF ; Unknown
- 0xABF0, # .. 0xABF9 ; Meetei_Mayek
- 0xABFA, # .. 0xABFF ; Unknown
- 0xAC00, # .. 0xD7A3 ; Hangul
- 0xD7A4, # .. 0xD7AF ; Unknown
- 0xD7B0, # .. 0xD7C6 ; Hangul
- 0xD7C7, # .. 0xD7CA ; Unknown
- 0xD7CB, # .. 0xD7FB ; Hangul
- 0xD7FC, # .. 0xF8FF ; Unknown
- 0xF900, # .. 0xFA6D ; Han
- 0xFA6E, # .. 0xFA6F ; Unknown
- 0xFA70, # .. 0xFAD9 ; Han
- 0xFADA, # .. 0xFAFF ; Unknown
- 0xFB00, # .. 0xFB06 ; Latin
- 0xFB07, # .. 0xFB12 ; Unknown
- 0xFB13, # .. 0xFB17 ; Armenian
- 0xFB18, # .. 0xFB1C ; Unknown
- 0xFB1D, # .. 0xFB36 ; Hebrew
- 0xFB37, # .. 0xFB37 ; Unknown
- 0xFB38, # .. 0xFB3C ; Hebrew
- 0xFB3D, # .. 0xFB3D ; Unknown
- 0xFB3E, # .. 0xFB3E ; Hebrew
- 0xFB3F, # .. 0xFB3F ; Unknown
- 0xFB40, # .. 0xFB41 ; Hebrew
- 0xFB42, # .. 0xFB42 ; Unknown
- 0xFB43, # .. 0xFB44 ; Hebrew
- 0xFB45, # .. 0xFB45 ; Unknown
- 0xFB46, # .. 0xFB4F ; Hebrew
- 0xFB50, # .. 0xFBC2 ; Arabic
- 0xFBC3, # .. 0xFBD2 ; Unknown
- 0xFBD3, # .. 0xFD3D ; Arabic
- 0xFD3E, # .. 0xFD3F ; Common
- 0xFD40, # .. 0xFD8F ; Arabic
- 0xFD90, # .. 0xFD91 ; Unknown
- 0xFD92, # .. 0xFDC7 ; Arabic
- 0xFDC8, # .. 0xFDCE ; Unknown
- 0xFDCF, # .. 0xFDCF ; Arabic
- 0xFDD0, # .. 0xFDEF ; Unknown
- 0xFDF0, # .. 0xFDFF ; Arabic
- 0xFE00, # .. 0xFE0F ; Inherited
- 0xFE10, # .. 0xFE19 ; Common
- 0xFE1A, # .. 0xFE1F ; Unknown
- 0xFE20, # .. 0xFE2D ; Inherited
- 0xFE2E, # .. 0xFE2F ; Cyrillic
- 0xFE30, # .. 0xFE52 ; Common
- 0xFE53, # .. 0xFE53 ; Unknown
- 0xFE54, # .. 0xFE66 ; Common
- 0xFE67, # .. 0xFE67 ; Unknown
- 0xFE68, # .. 0xFE6B ; Common
- 0xFE6C, # .. 0xFE6F ; Unknown
- 0xFE70, # .. 0xFE74 ; Arabic
- 0xFE75, # .. 0xFE75 ; Unknown
- 0xFE76, # .. 0xFEFC ; Arabic
- 0xFEFD, # .. 0xFEFE ; Unknown
- 0xFEFF, # .. 0xFEFF ; Common
- 0xFF00, # .. 0xFF00 ; Unknown
- 0xFF01, # .. 0xFF20 ; Common
- 0xFF21, # .. 0xFF3A ; Latin
- 0xFF3B, # .. 0xFF40 ; Common
- 0xFF41, # .. 0xFF5A ; Latin
- 0xFF5B, # .. 0xFF65 ; Common
- 0xFF66, # .. 0xFF6F ; Katakana
- 0xFF70, # .. 0xFF70 ; Common
- 0xFF71, # .. 0xFF9D ; Katakana
- 0xFF9E, # .. 0xFF9F ; Common
- 0xFFA0, # .. 0xFFBE ; Hangul
- 0xFFBF, # .. 0xFFC1 ; Unknown
- 0xFFC2, # .. 0xFFC7 ; Hangul
- 0xFFC8, # .. 0xFFC9 ; Unknown
- 0xFFCA, # .. 0xFFCF ; Hangul
- 0xFFD0, # .. 0xFFD1 ; Unknown
- 0xFFD2, # .. 0xFFD7 ; Hangul
- 0xFFD8, # .. 0xFFD9 ; Unknown
- 0xFFDA, # .. 0xFFDC ; Hangul
- 0xFFDD, # .. 0xFFDF ; Unknown
- 0xFFE0, # .. 0xFFE6 ; Common
- 0xFFE7, # .. 0xFFE7 ; Unknown
- 0xFFE8, # .. 0xFFEE ; Common
- 0xFFEF, # .. 0xFFF8 ; Unknown
- 0xFFF9, # .. 0xFFFD ; Common
- 0xFFFE, # .. 0xFFFF ; Unknown
- 0x10000, # .. 0x1000B ; Linear_B
- 0x1000C, # .. 0x1000C ; Unknown
- 0x1000D, # .. 0x10026 ; Linear_B
- 0x10027, # .. 0x10027 ; Unknown
- 0x10028, # .. 0x1003A ; Linear_B
- 0x1003B, # .. 0x1003B ; Unknown
- 0x1003C, # .. 0x1003D ; Linear_B
- 0x1003E, # .. 0x1003E ; Unknown
- 0x1003F, # .. 0x1004D ; Linear_B
- 0x1004E, # .. 0x1004F ; Unknown
- 0x10050, # .. 0x1005D ; Linear_B
- 0x1005E, # .. 0x1007F ; Unknown
- 0x10080, # .. 0x100FA ; Linear_B
- 0x100FB, # .. 0x100FF ; Unknown
- 0x10100, # .. 0x10102 ; Common
- 0x10103, # .. 0x10106 ; Unknown
- 0x10107, # .. 0x10133 ; Common
- 0x10134, # .. 0x10136 ; Unknown
- 0x10137, # .. 0x1013F ; Common
- 0x10140, # .. 0x1018E ; Greek
- 0x1018F, # .. 0x1018F ; Unknown
- 0x10190, # .. 0x1019C ; Common
- 0x1019D, # .. 0x1019F ; Unknown
- 0x101A0, # .. 0x101A0 ; Greek
- 0x101A1, # .. 0x101CF ; Unknown
- 0x101D0, # .. 0x101FC ; Common
- 0x101FD, # .. 0x101FD ; Inherited
- 0x101FE, # .. 0x1027F ; Unknown
- 0x10280, # .. 0x1029C ; Lycian
- 0x1029D, # .. 0x1029F ; Unknown
- 0x102A0, # .. 0x102D0 ; Carian
- 0x102D1, # .. 0x102DF ; Unknown
- 0x102E0, # .. 0x102E0 ; Inherited
- 0x102E1, # .. 0x102FB ; Common
- 0x102FC, # .. 0x102FF ; Unknown
- 0x10300, # .. 0x10323 ; Old_Italic
- 0x10324, # .. 0x1032C ; Unknown
- 0x1032D, # .. 0x1032F ; Old_Italic
- 0x10330, # .. 0x1034A ; Gothic
- 0x1034B, # .. 0x1034F ; Unknown
- 0x10350, # .. 0x1037A ; Old_Permic
- 0x1037B, # .. 0x1037F ; Unknown
- 0x10380, # .. 0x1039D ; Ugaritic
- 0x1039E, # .. 0x1039E ; Unknown
- 0x1039F, # .. 0x1039F ; Ugaritic
- 0x103A0, # .. 0x103C3 ; Old_Persian
- 0x103C4, # .. 0x103C7 ; Unknown
- 0x103C8, # .. 0x103D5 ; Old_Persian
- 0x103D6, # .. 0x103FF ; Unknown
- 0x10400, # .. 0x1044F ; Deseret
- 0x10450, # .. 0x1047F ; Shavian
- 0x10480, # .. 0x1049D ; Osmanya
- 0x1049E, # .. 0x1049F ; Unknown
- 0x104A0, # .. 0x104A9 ; Osmanya
- 0x104AA, # .. 0x104AF ; Unknown
- 0x104B0, # .. 0x104D3 ; Osage
- 0x104D4, # .. 0x104D7 ; Unknown
- 0x104D8, # .. 0x104FB ; Osage
- 0x104FC, # .. 0x104FF ; Unknown
- 0x10500, # .. 0x10527 ; Elbasan
- 0x10528, # .. 0x1052F ; Unknown
- 0x10530, # .. 0x10563 ; Caucasian_Albanian
- 0x10564, # .. 0x1056E ; Unknown
- 0x1056F, # .. 0x1056F ; Caucasian_Albanian
- 0x10570, # .. 0x1057A ; Vithkuqi
- 0x1057B, # .. 0x1057B ; Unknown
- 0x1057C, # .. 0x1058A ; Vithkuqi
- 0x1058B, # .. 0x1058B ; Unknown
- 0x1058C, # .. 0x10592 ; Vithkuqi
- 0x10593, # .. 0x10593 ; Unknown
- 0x10594, # .. 0x10595 ; Vithkuqi
- 0x10596, # .. 0x10596 ; Unknown
- 0x10597, # .. 0x105A1 ; Vithkuqi
- 0x105A2, # .. 0x105A2 ; Unknown
- 0x105A3, # .. 0x105B1 ; Vithkuqi
- 0x105B2, # .. 0x105B2 ; Unknown
- 0x105B3, # .. 0x105B9 ; Vithkuqi
- 0x105BA, # .. 0x105BA ; Unknown
- 0x105BB, # .. 0x105BC ; Vithkuqi
- 0x105BD, # .. 0x105FF ; Unknown
- 0x10600, # .. 0x10736 ; Linear_A
- 0x10737, # .. 0x1073F ; Unknown
- 0x10740, # .. 0x10755 ; Linear_A
- 0x10756, # .. 0x1075F ; Unknown
- 0x10760, # .. 0x10767 ; Linear_A
- 0x10768, # .. 0x1077F ; Unknown
- 0x10780, # .. 0x10785 ; Latin
- 0x10786, # .. 0x10786 ; Unknown
- 0x10787, # .. 0x107B0 ; Latin
- 0x107B1, # .. 0x107B1 ; Unknown
- 0x107B2, # .. 0x107BA ; Latin
- 0x107BB, # .. 0x107FF ; Unknown
- 0x10800, # .. 0x10805 ; Cypriot
- 0x10806, # .. 0x10807 ; Unknown
- 0x10808, # .. 0x10808 ; Cypriot
- 0x10809, # .. 0x10809 ; Unknown
- 0x1080A, # .. 0x10835 ; Cypriot
- 0x10836, # .. 0x10836 ; Unknown
- 0x10837, # .. 0x10838 ; Cypriot
- 0x10839, # .. 0x1083B ; Unknown
- 0x1083C, # .. 0x1083C ; Cypriot
- 0x1083D, # .. 0x1083E ; Unknown
- 0x1083F, # .. 0x1083F ; Cypriot
- 0x10840, # .. 0x10855 ; Imperial_Aramaic
- 0x10856, # .. 0x10856 ; Unknown
- 0x10857, # .. 0x1085F ; Imperial_Aramaic
- 0x10860, # .. 0x1087F ; Palmyrene
- 0x10880, # .. 0x1089E ; Nabataean
- 0x1089F, # .. 0x108A6 ; Unknown
- 0x108A7, # .. 0x108AF ; Nabataean
- 0x108B0, # .. 0x108DF ; Unknown
- 0x108E0, # .. 0x108F2 ; Hatran
- 0x108F3, # .. 0x108F3 ; Unknown
- 0x108F4, # .. 0x108F5 ; Hatran
- 0x108F6, # .. 0x108FA ; Unknown
- 0x108FB, # .. 0x108FF ; Hatran
- 0x10900, # .. 0x1091B ; Phoenician
- 0x1091C, # .. 0x1091E ; Unknown
- 0x1091F, # .. 0x1091F ; Phoenician
- 0x10920, # .. 0x10939 ; Lydian
- 0x1093A, # .. 0x1093E ; Unknown
- 0x1093F, # .. 0x1093F ; Lydian
- 0x10940, # .. 0x1097F ; Unknown
- 0x10980, # .. 0x1099F ; Meroitic_Hieroglyphs
- 0x109A0, # .. 0x109B7 ; Meroitic_Cursive
- 0x109B8, # .. 0x109BB ; Unknown
- 0x109BC, # .. 0x109CF ; Meroitic_Cursive
- 0x109D0, # .. 0x109D1 ; Unknown
- 0x109D2, # .. 0x109FF ; Meroitic_Cursive
- 0x10A00, # .. 0x10A03 ; Kharoshthi
- 0x10A04, # .. 0x10A04 ; Unknown
- 0x10A05, # .. 0x10A06 ; Kharoshthi
- 0x10A07, # .. 0x10A0B ; Unknown
- 0x10A0C, # .. 0x10A13 ; Kharoshthi
- 0x10A14, # .. 0x10A14 ; Unknown
- 0x10A15, # .. 0x10A17 ; Kharoshthi
- 0x10A18, # .. 0x10A18 ; Unknown
- 0x10A19, # .. 0x10A35 ; Kharoshthi
- 0x10A36, # .. 0x10A37 ; Unknown
- 0x10A38, # .. 0x10A3A ; Kharoshthi
- 0x10A3B, # .. 0x10A3E ; Unknown
- 0x10A3F, # .. 0x10A48 ; Kharoshthi
- 0x10A49, # .. 0x10A4F ; Unknown
- 0x10A50, # .. 0x10A58 ; Kharoshthi
- 0x10A59, # .. 0x10A5F ; Unknown
- 0x10A60, # .. 0x10A7F ; Old_South_Arabian
- 0x10A80, # .. 0x10A9F ; Old_North_Arabian
- 0x10AA0, # .. 0x10ABF ; Unknown
- 0x10AC0, # .. 0x10AE6 ; Manichaean
- 0x10AE7, # .. 0x10AEA ; Unknown
- 0x10AEB, # .. 0x10AF6 ; Manichaean
- 0x10AF7, # .. 0x10AFF ; Unknown
- 0x10B00, # .. 0x10B35 ; Avestan
- 0x10B36, # .. 0x10B38 ; Unknown
- 0x10B39, # .. 0x10B3F ; Avestan
- 0x10B40, # .. 0x10B55 ; Inscriptional_Parthian
- 0x10B56, # .. 0x10B57 ; Unknown
- 0x10B58, # .. 0x10B5F ; Inscriptional_Parthian
- 0x10B60, # .. 0x10B72 ; Inscriptional_Pahlavi
- 0x10B73, # .. 0x10B77 ; Unknown
- 0x10B78, # .. 0x10B7F ; Inscriptional_Pahlavi
- 0x10B80, # .. 0x10B91 ; Psalter_Pahlavi
- 0x10B92, # .. 0x10B98 ; Unknown
- 0x10B99, # .. 0x10B9C ; Psalter_Pahlavi
- 0x10B9D, # .. 0x10BA8 ; Unknown
- 0x10BA9, # .. 0x10BAF ; Psalter_Pahlavi
- 0x10BB0, # .. 0x10BFF ; Unknown
- 0x10C00, # .. 0x10C48 ; Old_Turkic
- 0x10C49, # .. 0x10C7F ; Unknown
- 0x10C80, # .. 0x10CB2 ; Old_Hungarian
- 0x10CB3, # .. 0x10CBF ; Unknown
- 0x10CC0, # .. 0x10CF2 ; Old_Hungarian
- 0x10CF3, # .. 0x10CF9 ; Unknown
- 0x10CFA, # .. 0x10CFF ; Old_Hungarian
- 0x10D00, # .. 0x10D27 ; Hanifi_Rohingya
- 0x10D28, # .. 0x10D2F ; Unknown
- 0x10D30, # .. 0x10D39 ; Hanifi_Rohingya
- 0x10D3A, # .. 0x10E5F ; Unknown
- 0x10E60, # .. 0x10E7E ; Arabic
- 0x10E7F, # .. 0x10E7F ; Unknown
- 0x10E80, # .. 0x10EA9 ; Yezidi
- 0x10EAA, # .. 0x10EAA ; Unknown
- 0x10EAB, # .. 0x10EAD ; Yezidi
- 0x10EAE, # .. 0x10EAF ; Unknown
- 0x10EB0, # .. 0x10EB1 ; Yezidi
- 0x10EB2, # .. 0x10EFC ; Unknown
- 0x10EFD, # .. 0x10EFF ; Arabic
- 0x10F00, # .. 0x10F27 ; Old_Sogdian
- 0x10F28, # .. 0x10F2F ; Unknown
- 0x10F30, # .. 0x10F59 ; Sogdian
- 0x10F5A, # .. 0x10F6F ; Unknown
- 0x10F70, # .. 0x10F89 ; Old_Uyghur
- 0x10F8A, # .. 0x10FAF ; Unknown
- 0x10FB0, # .. 0x10FCB ; Chorasmian
- 0x10FCC, # .. 0x10FDF ; Unknown
- 0x10FE0, # .. 0x10FF6 ; Elymaic
- 0x10FF7, # .. 0x10FFF ; Unknown
- 0x11000, # .. 0x1104D ; Brahmi
- 0x1104E, # .. 0x11051 ; Unknown
- 0x11052, # .. 0x11075 ; Brahmi
- 0x11076, # .. 0x1107E ; Unknown
- 0x1107F, # .. 0x1107F ; Brahmi
- 0x11080, # .. 0x110C2 ; Kaithi
- 0x110C3, # .. 0x110CC ; Unknown
- 0x110CD, # .. 0x110CD ; Kaithi
- 0x110CE, # .. 0x110CF ; Unknown
- 0x110D0, # .. 0x110E8 ; Sora_Sompeng
- 0x110E9, # .. 0x110EF ; Unknown
- 0x110F0, # .. 0x110F9 ; Sora_Sompeng
- 0x110FA, # .. 0x110FF ; Unknown
- 0x11100, # .. 0x11134 ; Chakma
- 0x11135, # .. 0x11135 ; Unknown
- 0x11136, # .. 0x11147 ; Chakma
- 0x11148, # .. 0x1114F ; Unknown
- 0x11150, # .. 0x11176 ; Mahajani
- 0x11177, # .. 0x1117F ; Unknown
- 0x11180, # .. 0x111DF ; Sharada
- 0x111E0, # .. 0x111E0 ; Unknown
- 0x111E1, # .. 0x111F4 ; Sinhala
- 0x111F5, # .. 0x111FF ; Unknown
- 0x11200, # .. 0x11211 ; Khojki
- 0x11212, # .. 0x11212 ; Unknown
- 0x11213, # .. 0x11241 ; Khojki
- 0x11242, # .. 0x1127F ; Unknown
- 0x11280, # .. 0x11286 ; Multani
- 0x11287, # .. 0x11287 ; Unknown
- 0x11288, # .. 0x11288 ; Multani
- 0x11289, # .. 0x11289 ; Unknown
- 0x1128A, # .. 0x1128D ; Multani
- 0x1128E, # .. 0x1128E ; Unknown
- 0x1128F, # .. 0x1129D ; Multani
- 0x1129E, # .. 0x1129E ; Unknown
- 0x1129F, # .. 0x112A9 ; Multani
- 0x112AA, # .. 0x112AF ; Unknown
- 0x112B0, # .. 0x112EA ; Khudawadi
- 0x112EB, # .. 0x112EF ; Unknown
- 0x112F0, # .. 0x112F9 ; Khudawadi
- 0x112FA, # .. 0x112FF ; Unknown
- 0x11300, # .. 0x11303 ; Grantha
- 0x11304, # .. 0x11304 ; Unknown
- 0x11305, # .. 0x1130C ; Grantha
- 0x1130D, # .. 0x1130E ; Unknown
- 0x1130F, # .. 0x11310 ; Grantha
- 0x11311, # .. 0x11312 ; Unknown
- 0x11313, # .. 0x11328 ; Grantha
- 0x11329, # .. 0x11329 ; Unknown
- 0x1132A, # .. 0x11330 ; Grantha
- 0x11331, # .. 0x11331 ; Unknown
- 0x11332, # .. 0x11333 ; Grantha
- 0x11334, # .. 0x11334 ; Unknown
- 0x11335, # .. 0x11339 ; Grantha
- 0x1133A, # .. 0x1133A ; Unknown
- 0x1133B, # .. 0x1133B ; Inherited
- 0x1133C, # .. 0x11344 ; Grantha
- 0x11345, # .. 0x11346 ; Unknown
- 0x11347, # .. 0x11348 ; Grantha
- 0x11349, # .. 0x1134A ; Unknown
- 0x1134B, # .. 0x1134D ; Grantha
- 0x1134E, # .. 0x1134F ; Unknown
- 0x11350, # .. 0x11350 ; Grantha
- 0x11351, # .. 0x11356 ; Unknown
- 0x11357, # .. 0x11357 ; Grantha
- 0x11358, # .. 0x1135C ; Unknown
- 0x1135D, # .. 0x11363 ; Grantha
- 0x11364, # .. 0x11365 ; Unknown
- 0x11366, # .. 0x1136C ; Grantha
- 0x1136D, # .. 0x1136F ; Unknown
- 0x11370, # .. 0x11374 ; Grantha
- 0x11375, # .. 0x113FF ; Unknown
- 0x11400, # .. 0x1145B ; Newa
- 0x1145C, # .. 0x1145C ; Unknown
- 0x1145D, # .. 0x11461 ; Newa
- 0x11462, # .. 0x1147F ; Unknown
- 0x11480, # .. 0x114C7 ; Tirhuta
- 0x114C8, # .. 0x114CF ; Unknown
- 0x114D0, # .. 0x114D9 ; Tirhuta
- 0x114DA, # .. 0x1157F ; Unknown
- 0x11580, # .. 0x115B5 ; Siddham
- 0x115B6, # .. 0x115B7 ; Unknown
- 0x115B8, # .. 0x115DD ; Siddham
- 0x115DE, # .. 0x115FF ; Unknown
- 0x11600, # .. 0x11644 ; Modi
- 0x11645, # .. 0x1164F ; Unknown
- 0x11650, # .. 0x11659 ; Modi
- 0x1165A, # .. 0x1165F ; Unknown
- 0x11660, # .. 0x1166C ; Mongolian
- 0x1166D, # .. 0x1167F ; Unknown
- 0x11680, # .. 0x116B9 ; Takri
- 0x116BA, # .. 0x116BF ; Unknown
- 0x116C0, # .. 0x116C9 ; Takri
- 0x116CA, # .. 0x116FF ; Unknown
- 0x11700, # .. 0x1171A ; Ahom
- 0x1171B, # .. 0x1171C ; Unknown
- 0x1171D, # .. 0x1172B ; Ahom
- 0x1172C, # .. 0x1172F ; Unknown
- 0x11730, # .. 0x11746 ; Ahom
- 0x11747, # .. 0x117FF ; Unknown
- 0x11800, # .. 0x1183B ; Dogra
- 0x1183C, # .. 0x1189F ; Unknown
- 0x118A0, # .. 0x118F2 ; Warang_Citi
- 0x118F3, # .. 0x118FE ; Unknown
- 0x118FF, # .. 0x118FF ; Warang_Citi
- 0x11900, # .. 0x11906 ; Dives_Akuru
- 0x11907, # .. 0x11908 ; Unknown
- 0x11909, # .. 0x11909 ; Dives_Akuru
- 0x1190A, # .. 0x1190B ; Unknown
- 0x1190C, # .. 0x11913 ; Dives_Akuru
- 0x11914, # .. 0x11914 ; Unknown
- 0x11915, # .. 0x11916 ; Dives_Akuru
- 0x11917, # .. 0x11917 ; Unknown
- 0x11918, # .. 0x11935 ; Dives_Akuru
- 0x11936, # .. 0x11936 ; Unknown
- 0x11937, # .. 0x11938 ; Dives_Akuru
- 0x11939, # .. 0x1193A ; Unknown
- 0x1193B, # .. 0x11946 ; Dives_Akuru
- 0x11947, # .. 0x1194F ; Unknown
- 0x11950, # .. 0x11959 ; Dives_Akuru
- 0x1195A, # .. 0x1199F ; Unknown
- 0x119A0, # .. 0x119A7 ; Nandinagari
- 0x119A8, # .. 0x119A9 ; Unknown
- 0x119AA, # .. 0x119D7 ; Nandinagari
- 0x119D8, # .. 0x119D9 ; Unknown
- 0x119DA, # .. 0x119E4 ; Nandinagari
- 0x119E5, # .. 0x119FF ; Unknown
- 0x11A00, # .. 0x11A47 ; Zanabazar_Square
- 0x11A48, # .. 0x11A4F ; Unknown
- 0x11A50, # .. 0x11AA2 ; Soyombo
- 0x11AA3, # .. 0x11AAF ; Unknown
- 0x11AB0, # .. 0x11ABF ; Canadian_Aboriginal
- 0x11AC0, # .. 0x11AF8 ; Pau_Cin_Hau
- 0x11AF9, # .. 0x11AFF ; Unknown
- 0x11B00, # .. 0x11B09 ; Devanagari
- 0x11B0A, # .. 0x11BFF ; Unknown
- 0x11C00, # .. 0x11C08 ; Bhaiksuki
- 0x11C09, # .. 0x11C09 ; Unknown
- 0x11C0A, # .. 0x11C36 ; Bhaiksuki
- 0x11C37, # .. 0x11C37 ; Unknown
- 0x11C38, # .. 0x11C45 ; Bhaiksuki
- 0x11C46, # .. 0x11C4F ; Unknown
- 0x11C50, # .. 0x11C6C ; Bhaiksuki
- 0x11C6D, # .. 0x11C6F ; Unknown
- 0x11C70, # .. 0x11C8F ; Marchen
- 0x11C90, # .. 0x11C91 ; Unknown
- 0x11C92, # .. 0x11CA7 ; Marchen
- 0x11CA8, # .. 0x11CA8 ; Unknown
- 0x11CA9, # .. 0x11CB6 ; Marchen
- 0x11CB7, # .. 0x11CFF ; Unknown
- 0x11D00, # .. 0x11D06 ; Masaram_Gondi
- 0x11D07, # .. 0x11D07 ; Unknown
- 0x11D08, # .. 0x11D09 ; Masaram_Gondi
- 0x11D0A, # .. 0x11D0A ; Unknown
- 0x11D0B, # .. 0x11D36 ; Masaram_Gondi
- 0x11D37, # .. 0x11D39 ; Unknown
- 0x11D3A, # .. 0x11D3A ; Masaram_Gondi
- 0x11D3B, # .. 0x11D3B ; Unknown
- 0x11D3C, # .. 0x11D3D ; Masaram_Gondi
- 0x11D3E, # .. 0x11D3E ; Unknown
- 0x11D3F, # .. 0x11D47 ; Masaram_Gondi
- 0x11D48, # .. 0x11D4F ; Unknown
- 0x11D50, # .. 0x11D59 ; Masaram_Gondi
- 0x11D5A, # .. 0x11D5F ; Unknown
- 0x11D60, # .. 0x11D65 ; Gunjala_Gondi
- 0x11D66, # .. 0x11D66 ; Unknown
- 0x11D67, # .. 0x11D68 ; Gunjala_Gondi
- 0x11D69, # .. 0x11D69 ; Unknown
- 0x11D6A, # .. 0x11D8E ; Gunjala_Gondi
- 0x11D8F, # .. 0x11D8F ; Unknown
- 0x11D90, # .. 0x11D91 ; Gunjala_Gondi
- 0x11D92, # .. 0x11D92 ; Unknown
- 0x11D93, # .. 0x11D98 ; Gunjala_Gondi
- 0x11D99, # .. 0x11D9F ; Unknown
- 0x11DA0, # .. 0x11DA9 ; Gunjala_Gondi
- 0x11DAA, # .. 0x11EDF ; Unknown
- 0x11EE0, # .. 0x11EF8 ; Makasar
- 0x11EF9, # .. 0x11EFF ; Unknown
- 0x11F00, # .. 0x11F10 ; Kawi
- 0x11F11, # .. 0x11F11 ; Unknown
- 0x11F12, # .. 0x11F3A ; Kawi
- 0x11F3B, # .. 0x11F3D ; Unknown
- 0x11F3E, # .. 0x11F59 ; Kawi
- 0x11F5A, # .. 0x11FAF ; Unknown
- 0x11FB0, # .. 0x11FB0 ; Lisu
- 0x11FB1, # .. 0x11FBF ; Unknown
- 0x11FC0, # .. 0x11FF1 ; Tamil
- 0x11FF2, # .. 0x11FFE ; Unknown
- 0x11FFF, # .. 0x11FFF ; Tamil
- 0x12000, # .. 0x12399 ; Cuneiform
- 0x1239A, # .. 0x123FF ; Unknown
- 0x12400, # .. 0x1246E ; Cuneiform
- 0x1246F, # .. 0x1246F ; Unknown
- 0x12470, # .. 0x12474 ; Cuneiform
- 0x12475, # .. 0x1247F ; Unknown
- 0x12480, # .. 0x12543 ; Cuneiform
- 0x12544, # .. 0x12F8F ; Unknown
- 0x12F90, # .. 0x12FF2 ; Cypro_Minoan
- 0x12FF3, # .. 0x12FFF ; Unknown
- 0x13000, # .. 0x13455 ; Egyptian_Hieroglyphs
- 0x13456, # .. 0x143FF ; Unknown
- 0x14400, # .. 0x14646 ; Anatolian_Hieroglyphs
- 0x14647, # .. 0x167FF ; Unknown
- 0x16800, # .. 0x16A38 ; Bamum
- 0x16A39, # .. 0x16A3F ; Unknown
- 0x16A40, # .. 0x16A5E ; Mro
- 0x16A5F, # .. 0x16A5F ; Unknown
- 0x16A60, # .. 0x16A69 ; Mro
- 0x16A6A, # .. 0x16A6D ; Unknown
- 0x16A6E, # .. 0x16A6F ; Mro
- 0x16A70, # .. 0x16ABE ; Tangsa
- 0x16ABF, # .. 0x16ABF ; Unknown
- 0x16AC0, # .. 0x16AC9 ; Tangsa
- 0x16ACA, # .. 0x16ACF ; Unknown
- 0x16AD0, # .. 0x16AED ; Bassa_Vah
- 0x16AEE, # .. 0x16AEF ; Unknown
- 0x16AF0, # .. 0x16AF5 ; Bassa_Vah
- 0x16AF6, # .. 0x16AFF ; Unknown
- 0x16B00, # .. 0x16B45 ; Pahawh_Hmong
- 0x16B46, # .. 0x16B4F ; Unknown
- 0x16B50, # .. 0x16B59 ; Pahawh_Hmong
- 0x16B5A, # .. 0x16B5A ; Unknown
- 0x16B5B, # .. 0x16B61 ; Pahawh_Hmong
- 0x16B62, # .. 0x16B62 ; Unknown
- 0x16B63, # .. 0x16B77 ; Pahawh_Hmong
- 0x16B78, # .. 0x16B7C ; Unknown
- 0x16B7D, # .. 0x16B8F ; Pahawh_Hmong
- 0x16B90, # .. 0x16E3F ; Unknown
- 0x16E40, # .. 0x16E9A ; Medefaidrin
- 0x16E9B, # .. 0x16EFF ; Unknown
- 0x16F00, # .. 0x16F4A ; Miao
- 0x16F4B, # .. 0x16F4E ; Unknown
- 0x16F4F, # .. 0x16F87 ; Miao
- 0x16F88, # .. 0x16F8E ; Unknown
- 0x16F8F, # .. 0x16F9F ; Miao
- 0x16FA0, # .. 0x16FDF ; Unknown
- 0x16FE0, # .. 0x16FE0 ; Tangut
- 0x16FE1, # .. 0x16FE1 ; Nushu
- 0x16FE2, # .. 0x16FE3 ; Han
- 0x16FE4, # .. 0x16FE4 ; Khitan_Small_Script
- 0x16FE5, # .. 0x16FEF ; Unknown
- 0x16FF0, # .. 0x16FF1 ; Han
- 0x16FF2, # .. 0x16FFF ; Unknown
- 0x17000, # .. 0x187F7 ; Tangut
- 0x187F8, # .. 0x187FF ; Unknown
- 0x18800, # .. 0x18AFF ; Tangut
- 0x18B00, # .. 0x18CD5 ; Khitan_Small_Script
- 0x18CD6, # .. 0x18CFF ; Unknown
- 0x18D00, # .. 0x18D08 ; Tangut
- 0x18D09, # .. 0x1AFEF ; Unknown
- 0x1AFF0, # .. 0x1AFF3 ; Katakana
- 0x1AFF4, # .. 0x1AFF4 ; Unknown
- 0x1AFF5, # .. 0x1AFFB ; Katakana
- 0x1AFFC, # .. 0x1AFFC ; Unknown
- 0x1AFFD, # .. 0x1AFFE ; Katakana
- 0x1AFFF, # .. 0x1AFFF ; Unknown
- 0x1B000, # .. 0x1B000 ; Katakana
- 0x1B001, # .. 0x1B11F ; Hiragana
- 0x1B120, # .. 0x1B122 ; Katakana
- 0x1B123, # .. 0x1B131 ; Unknown
- 0x1B132, # .. 0x1B132 ; Hiragana
- 0x1B133, # .. 0x1B14F ; Unknown
- 0x1B150, # .. 0x1B152 ; Hiragana
- 0x1B153, # .. 0x1B154 ; Unknown
- 0x1B155, # .. 0x1B155 ; Katakana
- 0x1B156, # .. 0x1B163 ; Unknown
- 0x1B164, # .. 0x1B167 ; Katakana
- 0x1B168, # .. 0x1B16F ; Unknown
- 0x1B170, # .. 0x1B2FB ; Nushu
- 0x1B2FC, # .. 0x1BBFF ; Unknown
- 0x1BC00, # .. 0x1BC6A ; Duployan
- 0x1BC6B, # .. 0x1BC6F ; Unknown
- 0x1BC70, # .. 0x1BC7C ; Duployan
- 0x1BC7D, # .. 0x1BC7F ; Unknown
- 0x1BC80, # .. 0x1BC88 ; Duployan
- 0x1BC89, # .. 0x1BC8F ; Unknown
- 0x1BC90, # .. 0x1BC99 ; Duployan
- 0x1BC9A, # .. 0x1BC9B ; Unknown
- 0x1BC9C, # .. 0x1BC9F ; Duployan
- 0x1BCA0, # .. 0x1BCA3 ; Common
- 0x1BCA4, # .. 0x1CEFF ; Unknown
- 0x1CF00, # .. 0x1CF2D ; Inherited
- 0x1CF2E, # .. 0x1CF2F ; Unknown
- 0x1CF30, # .. 0x1CF46 ; Inherited
- 0x1CF47, # .. 0x1CF4F ; Unknown
- 0x1CF50, # .. 0x1CFC3 ; Common
- 0x1CFC4, # .. 0x1CFFF ; Unknown
- 0x1D000, # .. 0x1D0F5 ; Common
- 0x1D0F6, # .. 0x1D0FF ; Unknown
- 0x1D100, # .. 0x1D126 ; Common
- 0x1D127, # .. 0x1D128 ; Unknown
- 0x1D129, # .. 0x1D166 ; Common
- 0x1D167, # .. 0x1D169 ; Inherited
- 0x1D16A, # .. 0x1D17A ; Common
- 0x1D17B, # .. 0x1D182 ; Inherited
- 0x1D183, # .. 0x1D184 ; Common
- 0x1D185, # .. 0x1D18B ; Inherited
- 0x1D18C, # .. 0x1D1A9 ; Common
- 0x1D1AA, # .. 0x1D1AD ; Inherited
- 0x1D1AE, # .. 0x1D1EA ; Common
- 0x1D1EB, # .. 0x1D1FF ; Unknown
- 0x1D200, # .. 0x1D245 ; Greek
- 0x1D246, # .. 0x1D2BF ; Unknown
- 0x1D2C0, # .. 0x1D2D3 ; Common
- 0x1D2D4, # .. 0x1D2DF ; Unknown
- 0x1D2E0, # .. 0x1D2F3 ; Common
- 0x1D2F4, # .. 0x1D2FF ; Unknown
- 0x1D300, # .. 0x1D356 ; Common
- 0x1D357, # .. 0x1D35F ; Unknown
- 0x1D360, # .. 0x1D378 ; Common
- 0x1D379, # .. 0x1D3FF ; Unknown
- 0x1D400, # .. 0x1D454 ; Common
- 0x1D455, # .. 0x1D455 ; Unknown
- 0x1D456, # .. 0x1D49C ; Common
- 0x1D49D, # .. 0x1D49D ; Unknown
- 0x1D49E, # .. 0x1D49F ; Common
- 0x1D4A0, # .. 0x1D4A1 ; Unknown
- 0x1D4A2, # .. 0x1D4A2 ; Common
- 0x1D4A3, # .. 0x1D4A4 ; Unknown
- 0x1D4A5, # .. 0x1D4A6 ; Common
- 0x1D4A7, # .. 0x1D4A8 ; Unknown
- 0x1D4A9, # .. 0x1D4AC ; Common
- 0x1D4AD, # .. 0x1D4AD ; Unknown
- 0x1D4AE, # .. 0x1D4B9 ; Common
- 0x1D4BA, # .. 0x1D4BA ; Unknown
- 0x1D4BB, # .. 0x1D4BB ; Common
- 0x1D4BC, # .. 0x1D4BC ; Unknown
- 0x1D4BD, # .. 0x1D4C3 ; Common
- 0x1D4C4, # .. 0x1D4C4 ; Unknown
- 0x1D4C5, # .. 0x1D505 ; Common
- 0x1D506, # .. 0x1D506 ; Unknown
- 0x1D507, # .. 0x1D50A ; Common
- 0x1D50B, # .. 0x1D50C ; Unknown
- 0x1D50D, # .. 0x1D514 ; Common
- 0x1D515, # .. 0x1D515 ; Unknown
- 0x1D516, # .. 0x1D51C ; Common
- 0x1D51D, # .. 0x1D51D ; Unknown
- 0x1D51E, # .. 0x1D539 ; Common
- 0x1D53A, # .. 0x1D53A ; Unknown
- 0x1D53B, # .. 0x1D53E ; Common
- 0x1D53F, # .. 0x1D53F ; Unknown
- 0x1D540, # .. 0x1D544 ; Common
- 0x1D545, # .. 0x1D545 ; Unknown
- 0x1D546, # .. 0x1D546 ; Common
- 0x1D547, # .. 0x1D549 ; Unknown
- 0x1D54A, # .. 0x1D550 ; Common
- 0x1D551, # .. 0x1D551 ; Unknown
- 0x1D552, # .. 0x1D6A5 ; Common
- 0x1D6A6, # .. 0x1D6A7 ; Unknown
- 0x1D6A8, # .. 0x1D7CB ; Common
- 0x1D7CC, # .. 0x1D7CD ; Unknown
- 0x1D7CE, # .. 0x1D7FF ; Common
- 0x1D800, # .. 0x1DA8B ; SignWriting
- 0x1DA8C, # .. 0x1DA9A ; Unknown
- 0x1DA9B, # .. 0x1DA9F ; SignWriting
- 0x1DAA0, # .. 0x1DAA0 ; Unknown
- 0x1DAA1, # .. 0x1DAAF ; SignWriting
- 0x1DAB0, # .. 0x1DEFF ; Unknown
- 0x1DF00, # .. 0x1DF1E ; Latin
- 0x1DF1F, # .. 0x1DF24 ; Unknown
- 0x1DF25, # .. 0x1DF2A ; Latin
- 0x1DF2B, # .. 0x1DFFF ; Unknown
- 0x1E000, # .. 0x1E006 ; Glagolitic
- 0x1E007, # .. 0x1E007 ; Unknown
- 0x1E008, # .. 0x1E018 ; Glagolitic
- 0x1E019, # .. 0x1E01A ; Unknown
- 0x1E01B, # .. 0x1E021 ; Glagolitic
- 0x1E022, # .. 0x1E022 ; Unknown
- 0x1E023, # .. 0x1E024 ; Glagolitic
- 0x1E025, # .. 0x1E025 ; Unknown
- 0x1E026, # .. 0x1E02A ; Glagolitic
- 0x1E02B, # .. 0x1E02F ; Unknown
- 0x1E030, # .. 0x1E06D ; Cyrillic
- 0x1E06E, # .. 0x1E08E ; Unknown
- 0x1E08F, # .. 0x1E08F ; Cyrillic
- 0x1E090, # .. 0x1E0FF ; Unknown
- 0x1E100, # .. 0x1E12C ; Nyiakeng_Puachue_Hmong
- 0x1E12D, # .. 0x1E12F ; Unknown
- 0x1E130, # .. 0x1E13D ; Nyiakeng_Puachue_Hmong
- 0x1E13E, # .. 0x1E13F ; Unknown
- 0x1E140, # .. 0x1E149 ; Nyiakeng_Puachue_Hmong
- 0x1E14A, # .. 0x1E14D ; Unknown
- 0x1E14E, # .. 0x1E14F ; Nyiakeng_Puachue_Hmong
- 0x1E150, # .. 0x1E28F ; Unknown
- 0x1E290, # .. 0x1E2AE ; Toto
- 0x1E2AF, # .. 0x1E2BF ; Unknown
- 0x1E2C0, # .. 0x1E2F9 ; Wancho
- 0x1E2FA, # .. 0x1E2FE ; Unknown
- 0x1E2FF, # .. 0x1E2FF ; Wancho
- 0x1E300, # .. 0x1E4CF ; Unknown
- 0x1E4D0, # .. 0x1E4F9 ; Nag_Mundari
- 0x1E4FA, # .. 0x1E7DF ; Unknown
- 0x1E7E0, # .. 0x1E7E6 ; Ethiopic
- 0x1E7E7, # .. 0x1E7E7 ; Unknown
- 0x1E7E8, # .. 0x1E7EB ; Ethiopic
- 0x1E7EC, # .. 0x1E7EC ; Unknown
- 0x1E7ED, # .. 0x1E7EE ; Ethiopic
- 0x1E7EF, # .. 0x1E7EF ; Unknown
- 0x1E7F0, # .. 0x1E7FE ; Ethiopic
- 0x1E7FF, # .. 0x1E7FF ; Unknown
- 0x1E800, # .. 0x1E8C4 ; Mende_Kikakui
- 0x1E8C5, # .. 0x1E8C6 ; Unknown
- 0x1E8C7, # .. 0x1E8D6 ; Mende_Kikakui
- 0x1E8D7, # .. 0x1E8FF ; Unknown
- 0x1E900, # .. 0x1E94B ; Adlam
- 0x1E94C, # .. 0x1E94F ; Unknown
- 0x1E950, # .. 0x1E959 ; Adlam
- 0x1E95A, # .. 0x1E95D ; Unknown
- 0x1E95E, # .. 0x1E95F ; Adlam
- 0x1E960, # .. 0x1EC70 ; Unknown
- 0x1EC71, # .. 0x1ECB4 ; Common
- 0x1ECB5, # .. 0x1ED00 ; Unknown
- 0x1ED01, # .. 0x1ED3D ; Common
- 0x1ED3E, # .. 0x1EDFF ; Unknown
- 0x1EE00, # .. 0x1EE03 ; Arabic
- 0x1EE04, # .. 0x1EE04 ; Unknown
- 0x1EE05, # .. 0x1EE1F ; Arabic
- 0x1EE20, # .. 0x1EE20 ; Unknown
- 0x1EE21, # .. 0x1EE22 ; Arabic
- 0x1EE23, # .. 0x1EE23 ; Unknown
- 0x1EE24, # .. 0x1EE24 ; Arabic
- 0x1EE25, # .. 0x1EE26 ; Unknown
- 0x1EE27, # .. 0x1EE27 ; Arabic
- 0x1EE28, # .. 0x1EE28 ; Unknown
- 0x1EE29, # .. 0x1EE32 ; Arabic
- 0x1EE33, # .. 0x1EE33 ; Unknown
- 0x1EE34, # .. 0x1EE37 ; Arabic
- 0x1EE38, # .. 0x1EE38 ; Unknown
- 0x1EE39, # .. 0x1EE39 ; Arabic
- 0x1EE3A, # .. 0x1EE3A ; Unknown
- 0x1EE3B, # .. 0x1EE3B ; Arabic
- 0x1EE3C, # .. 0x1EE41 ; Unknown
- 0x1EE42, # .. 0x1EE42 ; Arabic
- 0x1EE43, # .. 0x1EE46 ; Unknown
- 0x1EE47, # .. 0x1EE47 ; Arabic
- 0x1EE48, # .. 0x1EE48 ; Unknown
- 0x1EE49, # .. 0x1EE49 ; Arabic
- 0x1EE4A, # .. 0x1EE4A ; Unknown
- 0x1EE4B, # .. 0x1EE4B ; Arabic
- 0x1EE4C, # .. 0x1EE4C ; Unknown
- 0x1EE4D, # .. 0x1EE4F ; Arabic
- 0x1EE50, # .. 0x1EE50 ; Unknown
- 0x1EE51, # .. 0x1EE52 ; Arabic
- 0x1EE53, # .. 0x1EE53 ; Unknown
- 0x1EE54, # .. 0x1EE54 ; Arabic
- 0x1EE55, # .. 0x1EE56 ; Unknown
- 0x1EE57, # .. 0x1EE57 ; Arabic
- 0x1EE58, # .. 0x1EE58 ; Unknown
- 0x1EE59, # .. 0x1EE59 ; Arabic
- 0x1EE5A, # .. 0x1EE5A ; Unknown
- 0x1EE5B, # .. 0x1EE5B ; Arabic
- 0x1EE5C, # .. 0x1EE5C ; Unknown
- 0x1EE5D, # .. 0x1EE5D ; Arabic
- 0x1EE5E, # .. 0x1EE5E ; Unknown
- 0x1EE5F, # .. 0x1EE5F ; Arabic
- 0x1EE60, # .. 0x1EE60 ; Unknown
- 0x1EE61, # .. 0x1EE62 ; Arabic
- 0x1EE63, # .. 0x1EE63 ; Unknown
- 0x1EE64, # .. 0x1EE64 ; Arabic
- 0x1EE65, # .. 0x1EE66 ; Unknown
- 0x1EE67, # .. 0x1EE6A ; Arabic
- 0x1EE6B, # .. 0x1EE6B ; Unknown
- 0x1EE6C, # .. 0x1EE72 ; Arabic
- 0x1EE73, # .. 0x1EE73 ; Unknown
- 0x1EE74, # .. 0x1EE77 ; Arabic
- 0x1EE78, # .. 0x1EE78 ; Unknown
- 0x1EE79, # .. 0x1EE7C ; Arabic
- 0x1EE7D, # .. 0x1EE7D ; Unknown
- 0x1EE7E, # .. 0x1EE7E ; Arabic
- 0x1EE7F, # .. 0x1EE7F ; Unknown
- 0x1EE80, # .. 0x1EE89 ; Arabic
- 0x1EE8A, # .. 0x1EE8A ; Unknown
- 0x1EE8B, # .. 0x1EE9B ; Arabic
- 0x1EE9C, # .. 0x1EEA0 ; Unknown
- 0x1EEA1, # .. 0x1EEA3 ; Arabic
- 0x1EEA4, # .. 0x1EEA4 ; Unknown
- 0x1EEA5, # .. 0x1EEA9 ; Arabic
- 0x1EEAA, # .. 0x1EEAA ; Unknown
- 0x1EEAB, # .. 0x1EEBB ; Arabic
- 0x1EEBC, # .. 0x1EEEF ; Unknown
- 0x1EEF0, # .. 0x1EEF1 ; Arabic
- 0x1EEF2, # .. 0x1EFFF ; Unknown
- 0x1F000, # .. 0x1F02B ; Common
- 0x1F02C, # .. 0x1F02F ; Unknown
- 0x1F030, # .. 0x1F093 ; Common
- 0x1F094, # .. 0x1F09F ; Unknown
- 0x1F0A0, # .. 0x1F0AE ; Common
- 0x1F0AF, # .. 0x1F0B0 ; Unknown
- 0x1F0B1, # .. 0x1F0BF ; Common
- 0x1F0C0, # .. 0x1F0C0 ; Unknown
- 0x1F0C1, # .. 0x1F0CF ; Common
- 0x1F0D0, # .. 0x1F0D0 ; Unknown
- 0x1F0D1, # .. 0x1F0F5 ; Common
- 0x1F0F6, # .. 0x1F0FF ; Unknown
- 0x1F100, # .. 0x1F1AD ; Common
- 0x1F1AE, # .. 0x1F1E5 ; Unknown
- 0x1F1E6, # .. 0x1F1FF ; Common
- 0x1F200, # .. 0x1F200 ; Hiragana
- 0x1F201, # .. 0x1F202 ; Common
- 0x1F203, # .. 0x1F20F ; Unknown
- 0x1F210, # .. 0x1F23B ; Common
- 0x1F23C, # .. 0x1F23F ; Unknown
- 0x1F240, # .. 0x1F248 ; Common
- 0x1F249, # .. 0x1F24F ; Unknown
- 0x1F250, # .. 0x1F251 ; Common
- 0x1F252, # .. 0x1F25F ; Unknown
- 0x1F260, # .. 0x1F265 ; Common
- 0x1F266, # .. 0x1F2FF ; Unknown
- 0x1F300, # .. 0x1F6D7 ; Common
- 0x1F6D8, # .. 0x1F6DB ; Unknown
- 0x1F6DC, # .. 0x1F6EC ; Common
- 0x1F6ED, # .. 0x1F6EF ; Unknown
- 0x1F6F0, # .. 0x1F6FC ; Common
- 0x1F6FD, # .. 0x1F6FF ; Unknown
- 0x1F700, # .. 0x1F776 ; Common
- 0x1F777, # .. 0x1F77A ; Unknown
- 0x1F77B, # .. 0x1F7D9 ; Common
- 0x1F7DA, # .. 0x1F7DF ; Unknown
- 0x1F7E0, # .. 0x1F7EB ; Common
- 0x1F7EC, # .. 0x1F7EF ; Unknown
- 0x1F7F0, # .. 0x1F7F0 ; Common
- 0x1F7F1, # .. 0x1F7FF ; Unknown
- 0x1F800, # .. 0x1F80B ; Common
- 0x1F80C, # .. 0x1F80F ; Unknown
- 0x1F810, # .. 0x1F847 ; Common
- 0x1F848, # .. 0x1F84F ; Unknown
- 0x1F850, # .. 0x1F859 ; Common
- 0x1F85A, # .. 0x1F85F ; Unknown
- 0x1F860, # .. 0x1F887 ; Common
- 0x1F888, # .. 0x1F88F ; Unknown
- 0x1F890, # .. 0x1F8AD ; Common
- 0x1F8AE, # .. 0x1F8AF ; Unknown
- 0x1F8B0, # .. 0x1F8B1 ; Common
- 0x1F8B2, # .. 0x1F8FF ; Unknown
- 0x1F900, # .. 0x1FA53 ; Common
- 0x1FA54, # .. 0x1FA5F ; Unknown
- 0x1FA60, # .. 0x1FA6D ; Common
- 0x1FA6E, # .. 0x1FA6F ; Unknown
- 0x1FA70, # .. 0x1FA7C ; Common
- 0x1FA7D, # .. 0x1FA7F ; Unknown
- 0x1FA80, # .. 0x1FA88 ; Common
- 0x1FA89, # .. 0x1FA8F ; Unknown
- 0x1FA90, # .. 0x1FABD ; Common
- 0x1FABE, # .. 0x1FABE ; Unknown
- 0x1FABF, # .. 0x1FAC5 ; Common
- 0x1FAC6, # .. 0x1FACD ; Unknown
- 0x1FACE, # .. 0x1FADB ; Common
- 0x1FADC, # .. 0x1FADF ; Unknown
- 0x1FAE0, # .. 0x1FAE8 ; Common
- 0x1FAE9, # .. 0x1FAEF ; Unknown
- 0x1FAF0, # .. 0x1FAF8 ; Common
- 0x1FAF9, # .. 0x1FAFF ; Unknown
- 0x1FB00, # .. 0x1FB92 ; Common
- 0x1FB93, # .. 0x1FB93 ; Unknown
- 0x1FB94, # .. 0x1FBCA ; Common
- 0x1FBCB, # .. 0x1FBEF ; Unknown
- 0x1FBF0, # .. 0x1FBF9 ; Common
- 0x1FBFA, # .. 0x1FFFF ; Unknown
- 0x20000, # .. 0x2A6DF ; Han
- 0x2A6E0, # .. 0x2A6FF ; Unknown
- 0x2A700, # .. 0x2B739 ; Han
- 0x2B73A, # .. 0x2B73F ; Unknown
- 0x2B740, # .. 0x2B81D ; Han
- 0x2B81E, # .. 0x2B81F ; Unknown
- 0x2B820, # .. 0x2CEA1 ; Han
- 0x2CEA2, # .. 0x2CEAF ; Unknown
- 0x2CEB0, # .. 0x2EBE0 ; Han
- 0x2EBE1, # .. 0x2F7FF ; Unknown
- 0x2F800, # .. 0x2FA1D ; Han
- 0x2FA1E, # .. 0x2FFFF ; Unknown
- 0x30000, # .. 0x3134A ; Han
- 0x3134B, # .. 0x3134F ; Unknown
- 0x31350, # .. 0x323AF ; Han
- 0x323B0, # .. 0xE0000 ; Unknown
- 0xE0001, # .. 0xE0001 ; Common
- 0xE0002, # .. 0xE001F ; Unknown
- 0xE0020, # .. 0xE007F ; Common
- 0xE0080, # .. 0xE00FF ; Unknown
- 0xE0100, # .. 0xE01EF ; Inherited
- 0xE01F0, # .. 0x10FFFF ; Unknown
-]
-
-VALUES = [
- "Zyyy", # 0000..0040 ; Common
- "Latn", # 0041..005A ; Latin
- "Zyyy", # 005B..0060 ; Common
- "Latn", # 0061..007A ; Latin
- "Zyyy", # 007B..00A9 ; Common
- "Latn", # 00AA..00AA ; Latin
- "Zyyy", # 00AB..00B9 ; Common
- "Latn", # 00BA..00BA ; Latin
- "Zyyy", # 00BB..00BF ; Common
- "Latn", # 00C0..00D6 ; Latin
- "Zyyy", # 00D7..00D7 ; Common
- "Latn", # 00D8..00F6 ; Latin
- "Zyyy", # 00F7..00F7 ; Common
- "Latn", # 00F8..02B8 ; Latin
- "Zyyy", # 02B9..02DF ; Common
- "Latn", # 02E0..02E4 ; Latin
- "Zyyy", # 02E5..02E9 ; Common
- "Bopo", # 02EA..02EB ; Bopomofo
- "Zyyy", # 02EC..02FF ; Common
- "Zinh", # 0300..036F ; Inherited
- "Grek", # 0370..0373 ; Greek
- "Zyyy", # 0374..0374 ; Common
- "Grek", # 0375..0377 ; Greek
- "Zzzz", # 0378..0379 ; Unknown
- "Grek", # 037A..037D ; Greek
- "Zyyy", # 037E..037E ; Common
- "Grek", # 037F..037F ; Greek
- "Zzzz", # 0380..0383 ; Unknown
- "Grek", # 0384..0384 ; Greek
- "Zyyy", # 0385..0385 ; Common
- "Grek", # 0386..0386 ; Greek
- "Zyyy", # 0387..0387 ; Common
- "Grek", # 0388..038A ; Greek
- "Zzzz", # 038B..038B ; Unknown
- "Grek", # 038C..038C ; Greek
- "Zzzz", # 038D..038D ; Unknown
- "Grek", # 038E..03A1 ; Greek
- "Zzzz", # 03A2..03A2 ; Unknown
- "Grek", # 03A3..03E1 ; Greek
- "Copt", # 03E2..03EF ; Coptic
- "Grek", # 03F0..03FF ; Greek
- "Cyrl", # 0400..0484 ; Cyrillic
- "Zinh", # 0485..0486 ; Inherited
- "Cyrl", # 0487..052F ; Cyrillic
- "Zzzz", # 0530..0530 ; Unknown
- "Armn", # 0531..0556 ; Armenian
- "Zzzz", # 0557..0558 ; Unknown
- "Armn", # 0559..058A ; Armenian
- "Zzzz", # 058B..058C ; Unknown
- "Armn", # 058D..058F ; Armenian
- "Zzzz", # 0590..0590 ; Unknown
- "Hebr", # 0591..05C7 ; Hebrew
- "Zzzz", # 05C8..05CF ; Unknown
- "Hebr", # 05D0..05EA ; Hebrew
- "Zzzz", # 05EB..05EE ; Unknown
- "Hebr", # 05EF..05F4 ; Hebrew
- "Zzzz", # 05F5..05FF ; Unknown
- "Arab", # 0600..0604 ; Arabic
- "Zyyy", # 0605..0605 ; Common
- "Arab", # 0606..060B ; Arabic
- "Zyyy", # 060C..060C ; Common
- "Arab", # 060D..061A ; Arabic
- "Zyyy", # 061B..061B ; Common
- "Arab", # 061C..061E ; Arabic
- "Zyyy", # 061F..061F ; Common
- "Arab", # 0620..063F ; Arabic
- "Zyyy", # 0640..0640 ; Common
- "Arab", # 0641..064A ; Arabic
- "Zinh", # 064B..0655 ; Inherited
- "Arab", # 0656..066F ; Arabic
- "Zinh", # 0670..0670 ; Inherited
- "Arab", # 0671..06DC ; Arabic
- "Zyyy", # 06DD..06DD ; Common
- "Arab", # 06DE..06FF ; Arabic
- "Syrc", # 0700..070D ; Syriac
- "Zzzz", # 070E..070E ; Unknown
- "Syrc", # 070F..074A ; Syriac
- "Zzzz", # 074B..074C ; Unknown
- "Syrc", # 074D..074F ; Syriac
- "Arab", # 0750..077F ; Arabic
- "Thaa", # 0780..07B1 ; Thaana
- "Zzzz", # 07B2..07BF ; Unknown
- "Nkoo", # 07C0..07FA ; Nko
- "Zzzz", # 07FB..07FC ; Unknown
- "Nkoo", # 07FD..07FF ; Nko
- "Samr", # 0800..082D ; Samaritan
- "Zzzz", # 082E..082F ; Unknown
- "Samr", # 0830..083E ; Samaritan
- "Zzzz", # 083F..083F ; Unknown
- "Mand", # 0840..085B ; Mandaic
- "Zzzz", # 085C..085D ; Unknown
- "Mand", # 085E..085E ; Mandaic
- "Zzzz", # 085F..085F ; Unknown
- "Syrc", # 0860..086A ; Syriac
- "Zzzz", # 086B..086F ; Unknown
- "Arab", # 0870..088E ; Arabic
- "Zzzz", # 088F..088F ; Unknown
- "Arab", # 0890..0891 ; Arabic
- "Zzzz", # 0892..0897 ; Unknown
- "Arab", # 0898..08E1 ; Arabic
- "Zyyy", # 08E2..08E2 ; Common
- "Arab", # 08E3..08FF ; Arabic
- "Deva", # 0900..0950 ; Devanagari
- "Zinh", # 0951..0954 ; Inherited
- "Deva", # 0955..0963 ; Devanagari
- "Zyyy", # 0964..0965 ; Common
- "Deva", # 0966..097F ; Devanagari
- "Beng", # 0980..0983 ; Bengali
- "Zzzz", # 0984..0984 ; Unknown
- "Beng", # 0985..098C ; Bengali
- "Zzzz", # 098D..098E ; Unknown
- "Beng", # 098F..0990 ; Bengali
- "Zzzz", # 0991..0992 ; Unknown
- "Beng", # 0993..09A8 ; Bengali
- "Zzzz", # 09A9..09A9 ; Unknown
- "Beng", # 09AA..09B0 ; Bengali
- "Zzzz", # 09B1..09B1 ; Unknown
- "Beng", # 09B2..09B2 ; Bengali
- "Zzzz", # 09B3..09B5 ; Unknown
- "Beng", # 09B6..09B9 ; Bengali
- "Zzzz", # 09BA..09BB ; Unknown
- "Beng", # 09BC..09C4 ; Bengali
- "Zzzz", # 09C5..09C6 ; Unknown
- "Beng", # 09C7..09C8 ; Bengali
- "Zzzz", # 09C9..09CA ; Unknown
- "Beng", # 09CB..09CE ; Bengali
- "Zzzz", # 09CF..09D6 ; Unknown
- "Beng", # 09D7..09D7 ; Bengali
- "Zzzz", # 09D8..09DB ; Unknown
- "Beng", # 09DC..09DD ; Bengali
- "Zzzz", # 09DE..09DE ; Unknown
- "Beng", # 09DF..09E3 ; Bengali
- "Zzzz", # 09E4..09E5 ; Unknown
- "Beng", # 09E6..09FE ; Bengali
- "Zzzz", # 09FF..0A00 ; Unknown
- "Guru", # 0A01..0A03 ; Gurmukhi
- "Zzzz", # 0A04..0A04 ; Unknown
- "Guru", # 0A05..0A0A ; Gurmukhi
- "Zzzz", # 0A0B..0A0E ; Unknown
- "Guru", # 0A0F..0A10 ; Gurmukhi
- "Zzzz", # 0A11..0A12 ; Unknown
- "Guru", # 0A13..0A28 ; Gurmukhi
- "Zzzz", # 0A29..0A29 ; Unknown
- "Guru", # 0A2A..0A30 ; Gurmukhi
- "Zzzz", # 0A31..0A31 ; Unknown
- "Guru", # 0A32..0A33 ; Gurmukhi
- "Zzzz", # 0A34..0A34 ; Unknown
- "Guru", # 0A35..0A36 ; Gurmukhi
- "Zzzz", # 0A37..0A37 ; Unknown
- "Guru", # 0A38..0A39 ; Gurmukhi
- "Zzzz", # 0A3A..0A3B ; Unknown
- "Guru", # 0A3C..0A3C ; Gurmukhi
- "Zzzz", # 0A3D..0A3D ; Unknown
- "Guru", # 0A3E..0A42 ; Gurmukhi
- "Zzzz", # 0A43..0A46 ; Unknown
- "Guru", # 0A47..0A48 ; Gurmukhi
- "Zzzz", # 0A49..0A4A ; Unknown
- "Guru", # 0A4B..0A4D ; Gurmukhi
- "Zzzz", # 0A4E..0A50 ; Unknown
- "Guru", # 0A51..0A51 ; Gurmukhi
- "Zzzz", # 0A52..0A58 ; Unknown
- "Guru", # 0A59..0A5C ; Gurmukhi
- "Zzzz", # 0A5D..0A5D ; Unknown
- "Guru", # 0A5E..0A5E ; Gurmukhi
- "Zzzz", # 0A5F..0A65 ; Unknown
- "Guru", # 0A66..0A76 ; Gurmukhi
- "Zzzz", # 0A77..0A80 ; Unknown
- "Gujr", # 0A81..0A83 ; Gujarati
- "Zzzz", # 0A84..0A84 ; Unknown
- "Gujr", # 0A85..0A8D ; Gujarati
- "Zzzz", # 0A8E..0A8E ; Unknown
- "Gujr", # 0A8F..0A91 ; Gujarati
- "Zzzz", # 0A92..0A92 ; Unknown
- "Gujr", # 0A93..0AA8 ; Gujarati
- "Zzzz", # 0AA9..0AA9 ; Unknown
- "Gujr", # 0AAA..0AB0 ; Gujarati
- "Zzzz", # 0AB1..0AB1 ; Unknown
- "Gujr", # 0AB2..0AB3 ; Gujarati
- "Zzzz", # 0AB4..0AB4 ; Unknown
- "Gujr", # 0AB5..0AB9 ; Gujarati
- "Zzzz", # 0ABA..0ABB ; Unknown
- "Gujr", # 0ABC..0AC5 ; Gujarati
- "Zzzz", # 0AC6..0AC6 ; Unknown
- "Gujr", # 0AC7..0AC9 ; Gujarati
- "Zzzz", # 0ACA..0ACA ; Unknown
- "Gujr", # 0ACB..0ACD ; Gujarati
- "Zzzz", # 0ACE..0ACF ; Unknown
- "Gujr", # 0AD0..0AD0 ; Gujarati
- "Zzzz", # 0AD1..0ADF ; Unknown
- "Gujr", # 0AE0..0AE3 ; Gujarati
- "Zzzz", # 0AE4..0AE5 ; Unknown
- "Gujr", # 0AE6..0AF1 ; Gujarati
- "Zzzz", # 0AF2..0AF8 ; Unknown
- "Gujr", # 0AF9..0AFF ; Gujarati
- "Zzzz", # 0B00..0B00 ; Unknown
- "Orya", # 0B01..0B03 ; Oriya
- "Zzzz", # 0B04..0B04 ; Unknown
- "Orya", # 0B05..0B0C ; Oriya
- "Zzzz", # 0B0D..0B0E ; Unknown
- "Orya", # 0B0F..0B10 ; Oriya
- "Zzzz", # 0B11..0B12 ; Unknown
- "Orya", # 0B13..0B28 ; Oriya
- "Zzzz", # 0B29..0B29 ; Unknown
- "Orya", # 0B2A..0B30 ; Oriya
- "Zzzz", # 0B31..0B31 ; Unknown
- "Orya", # 0B32..0B33 ; Oriya
- "Zzzz", # 0B34..0B34 ; Unknown
- "Orya", # 0B35..0B39 ; Oriya
- "Zzzz", # 0B3A..0B3B ; Unknown
- "Orya", # 0B3C..0B44 ; Oriya
- "Zzzz", # 0B45..0B46 ; Unknown
- "Orya", # 0B47..0B48 ; Oriya
- "Zzzz", # 0B49..0B4A ; Unknown
- "Orya", # 0B4B..0B4D ; Oriya
- "Zzzz", # 0B4E..0B54 ; Unknown
- "Orya", # 0B55..0B57 ; Oriya
- "Zzzz", # 0B58..0B5B ; Unknown
- "Orya", # 0B5C..0B5D ; Oriya
- "Zzzz", # 0B5E..0B5E ; Unknown
- "Orya", # 0B5F..0B63 ; Oriya
- "Zzzz", # 0B64..0B65 ; Unknown
- "Orya", # 0B66..0B77 ; Oriya
- "Zzzz", # 0B78..0B81 ; Unknown
- "Taml", # 0B82..0B83 ; Tamil
- "Zzzz", # 0B84..0B84 ; Unknown
- "Taml", # 0B85..0B8A ; Tamil
- "Zzzz", # 0B8B..0B8D ; Unknown
- "Taml", # 0B8E..0B90 ; Tamil
- "Zzzz", # 0B91..0B91 ; Unknown
- "Taml", # 0B92..0B95 ; Tamil
- "Zzzz", # 0B96..0B98 ; Unknown
- "Taml", # 0B99..0B9A ; Tamil
- "Zzzz", # 0B9B..0B9B ; Unknown
- "Taml", # 0B9C..0B9C ; Tamil
- "Zzzz", # 0B9D..0B9D ; Unknown
- "Taml", # 0B9E..0B9F ; Tamil
- "Zzzz", # 0BA0..0BA2 ; Unknown
- "Taml", # 0BA3..0BA4 ; Tamil
- "Zzzz", # 0BA5..0BA7 ; Unknown
- "Taml", # 0BA8..0BAA ; Tamil
- "Zzzz", # 0BAB..0BAD ; Unknown
- "Taml", # 0BAE..0BB9 ; Tamil
- "Zzzz", # 0BBA..0BBD ; Unknown
- "Taml", # 0BBE..0BC2 ; Tamil
- "Zzzz", # 0BC3..0BC5 ; Unknown
- "Taml", # 0BC6..0BC8 ; Tamil
- "Zzzz", # 0BC9..0BC9 ; Unknown
- "Taml", # 0BCA..0BCD ; Tamil
- "Zzzz", # 0BCE..0BCF ; Unknown
- "Taml", # 0BD0..0BD0 ; Tamil
- "Zzzz", # 0BD1..0BD6 ; Unknown
- "Taml", # 0BD7..0BD7 ; Tamil
- "Zzzz", # 0BD8..0BE5 ; Unknown
- "Taml", # 0BE6..0BFA ; Tamil
- "Zzzz", # 0BFB..0BFF ; Unknown
- "Telu", # 0C00..0C0C ; Telugu
- "Zzzz", # 0C0D..0C0D ; Unknown
- "Telu", # 0C0E..0C10 ; Telugu
- "Zzzz", # 0C11..0C11 ; Unknown
- "Telu", # 0C12..0C28 ; Telugu
- "Zzzz", # 0C29..0C29 ; Unknown
- "Telu", # 0C2A..0C39 ; Telugu
- "Zzzz", # 0C3A..0C3B ; Unknown
- "Telu", # 0C3C..0C44 ; Telugu
- "Zzzz", # 0C45..0C45 ; Unknown
- "Telu", # 0C46..0C48 ; Telugu
- "Zzzz", # 0C49..0C49 ; Unknown
- "Telu", # 0C4A..0C4D ; Telugu
- "Zzzz", # 0C4E..0C54 ; Unknown
- "Telu", # 0C55..0C56 ; Telugu
- "Zzzz", # 0C57..0C57 ; Unknown
- "Telu", # 0C58..0C5A ; Telugu
- "Zzzz", # 0C5B..0C5C ; Unknown
- "Telu", # 0C5D..0C5D ; Telugu
- "Zzzz", # 0C5E..0C5F ; Unknown
- "Telu", # 0C60..0C63 ; Telugu
- "Zzzz", # 0C64..0C65 ; Unknown
- "Telu", # 0C66..0C6F ; Telugu
- "Zzzz", # 0C70..0C76 ; Unknown
- "Telu", # 0C77..0C7F ; Telugu
- "Knda", # 0C80..0C8C ; Kannada
- "Zzzz", # 0C8D..0C8D ; Unknown
- "Knda", # 0C8E..0C90 ; Kannada
- "Zzzz", # 0C91..0C91 ; Unknown
- "Knda", # 0C92..0CA8 ; Kannada
- "Zzzz", # 0CA9..0CA9 ; Unknown
- "Knda", # 0CAA..0CB3 ; Kannada
- "Zzzz", # 0CB4..0CB4 ; Unknown
- "Knda", # 0CB5..0CB9 ; Kannada
- "Zzzz", # 0CBA..0CBB ; Unknown
- "Knda", # 0CBC..0CC4 ; Kannada
- "Zzzz", # 0CC5..0CC5 ; Unknown
- "Knda", # 0CC6..0CC8 ; Kannada
- "Zzzz", # 0CC9..0CC9 ; Unknown
- "Knda", # 0CCA..0CCD ; Kannada
- "Zzzz", # 0CCE..0CD4 ; Unknown
- "Knda", # 0CD5..0CD6 ; Kannada
- "Zzzz", # 0CD7..0CDC ; Unknown
- "Knda", # 0CDD..0CDE ; Kannada
- "Zzzz", # 0CDF..0CDF ; Unknown
- "Knda", # 0CE0..0CE3 ; Kannada
- "Zzzz", # 0CE4..0CE5 ; Unknown
- "Knda", # 0CE6..0CEF ; Kannada
- "Zzzz", # 0CF0..0CF0 ; Unknown
- "Knda", # 0CF1..0CF3 ; Kannada
- "Zzzz", # 0CF4..0CFF ; Unknown
- "Mlym", # 0D00..0D0C ; Malayalam
- "Zzzz", # 0D0D..0D0D ; Unknown
- "Mlym", # 0D0E..0D10 ; Malayalam
- "Zzzz", # 0D11..0D11 ; Unknown
- "Mlym", # 0D12..0D44 ; Malayalam
- "Zzzz", # 0D45..0D45 ; Unknown
- "Mlym", # 0D46..0D48 ; Malayalam
- "Zzzz", # 0D49..0D49 ; Unknown
- "Mlym", # 0D4A..0D4F ; Malayalam
- "Zzzz", # 0D50..0D53 ; Unknown
- "Mlym", # 0D54..0D63 ; Malayalam
- "Zzzz", # 0D64..0D65 ; Unknown
- "Mlym", # 0D66..0D7F ; Malayalam
- "Zzzz", # 0D80..0D80 ; Unknown
- "Sinh", # 0D81..0D83 ; Sinhala
- "Zzzz", # 0D84..0D84 ; Unknown
- "Sinh", # 0D85..0D96 ; Sinhala
- "Zzzz", # 0D97..0D99 ; Unknown
- "Sinh", # 0D9A..0DB1 ; Sinhala
- "Zzzz", # 0DB2..0DB2 ; Unknown
- "Sinh", # 0DB3..0DBB ; Sinhala
- "Zzzz", # 0DBC..0DBC ; Unknown
- "Sinh", # 0DBD..0DBD ; Sinhala
- "Zzzz", # 0DBE..0DBF ; Unknown
- "Sinh", # 0DC0..0DC6 ; Sinhala
- "Zzzz", # 0DC7..0DC9 ; Unknown
- "Sinh", # 0DCA..0DCA ; Sinhala
- "Zzzz", # 0DCB..0DCE ; Unknown
- "Sinh", # 0DCF..0DD4 ; Sinhala
- "Zzzz", # 0DD5..0DD5 ; Unknown
- "Sinh", # 0DD6..0DD6 ; Sinhala
- "Zzzz", # 0DD7..0DD7 ; Unknown
- "Sinh", # 0DD8..0DDF ; Sinhala
- "Zzzz", # 0DE0..0DE5 ; Unknown
- "Sinh", # 0DE6..0DEF ; Sinhala
- "Zzzz", # 0DF0..0DF1 ; Unknown
- "Sinh", # 0DF2..0DF4 ; Sinhala
- "Zzzz", # 0DF5..0E00 ; Unknown
- "Thai", # 0E01..0E3A ; Thai
- "Zzzz", # 0E3B..0E3E ; Unknown
- "Zyyy", # 0E3F..0E3F ; Common
- "Thai", # 0E40..0E5B ; Thai
- "Zzzz", # 0E5C..0E80 ; Unknown
- "Laoo", # 0E81..0E82 ; Lao
- "Zzzz", # 0E83..0E83 ; Unknown
- "Laoo", # 0E84..0E84 ; Lao
- "Zzzz", # 0E85..0E85 ; Unknown
- "Laoo", # 0E86..0E8A ; Lao
- "Zzzz", # 0E8B..0E8B ; Unknown
- "Laoo", # 0E8C..0EA3 ; Lao
- "Zzzz", # 0EA4..0EA4 ; Unknown
- "Laoo", # 0EA5..0EA5 ; Lao
- "Zzzz", # 0EA6..0EA6 ; Unknown
- "Laoo", # 0EA7..0EBD ; Lao
- "Zzzz", # 0EBE..0EBF ; Unknown
- "Laoo", # 0EC0..0EC4 ; Lao
- "Zzzz", # 0EC5..0EC5 ; Unknown
- "Laoo", # 0EC6..0EC6 ; Lao
- "Zzzz", # 0EC7..0EC7 ; Unknown
- "Laoo", # 0EC8..0ECE ; Lao
- "Zzzz", # 0ECF..0ECF ; Unknown
- "Laoo", # 0ED0..0ED9 ; Lao
- "Zzzz", # 0EDA..0EDB ; Unknown
- "Laoo", # 0EDC..0EDF ; Lao
- "Zzzz", # 0EE0..0EFF ; Unknown
- "Tibt", # 0F00..0F47 ; Tibetan
- "Zzzz", # 0F48..0F48 ; Unknown
- "Tibt", # 0F49..0F6C ; Tibetan
- "Zzzz", # 0F6D..0F70 ; Unknown
- "Tibt", # 0F71..0F97 ; Tibetan
- "Zzzz", # 0F98..0F98 ; Unknown
- "Tibt", # 0F99..0FBC ; Tibetan
- "Zzzz", # 0FBD..0FBD ; Unknown
- "Tibt", # 0FBE..0FCC ; Tibetan
- "Zzzz", # 0FCD..0FCD ; Unknown
- "Tibt", # 0FCE..0FD4 ; Tibetan
- "Zyyy", # 0FD5..0FD8 ; Common
- "Tibt", # 0FD9..0FDA ; Tibetan
- "Zzzz", # 0FDB..0FFF ; Unknown
- "Mymr", # 1000..109F ; Myanmar
- "Geor", # 10A0..10C5 ; Georgian
- "Zzzz", # 10C6..10C6 ; Unknown
- "Geor", # 10C7..10C7 ; Georgian
- "Zzzz", # 10C8..10CC ; Unknown
- "Geor", # 10CD..10CD ; Georgian
- "Zzzz", # 10CE..10CF ; Unknown
- "Geor", # 10D0..10FA ; Georgian
- "Zyyy", # 10FB..10FB ; Common
- "Geor", # 10FC..10FF ; Georgian
- "Hang", # 1100..11FF ; Hangul
- "Ethi", # 1200..1248 ; Ethiopic
- "Zzzz", # 1249..1249 ; Unknown
- "Ethi", # 124A..124D ; Ethiopic
- "Zzzz", # 124E..124F ; Unknown
- "Ethi", # 1250..1256 ; Ethiopic
- "Zzzz", # 1257..1257 ; Unknown
- "Ethi", # 1258..1258 ; Ethiopic
- "Zzzz", # 1259..1259 ; Unknown
- "Ethi", # 125A..125D ; Ethiopic
- "Zzzz", # 125E..125F ; Unknown
- "Ethi", # 1260..1288 ; Ethiopic
- "Zzzz", # 1289..1289 ; Unknown
- "Ethi", # 128A..128D ; Ethiopic
- "Zzzz", # 128E..128F ; Unknown
- "Ethi", # 1290..12B0 ; Ethiopic
- "Zzzz", # 12B1..12B1 ; Unknown
- "Ethi", # 12B2..12B5 ; Ethiopic
- "Zzzz", # 12B6..12B7 ; Unknown
- "Ethi", # 12B8..12BE ; Ethiopic
- "Zzzz", # 12BF..12BF ; Unknown
- "Ethi", # 12C0..12C0 ; Ethiopic
- "Zzzz", # 12C1..12C1 ; Unknown
- "Ethi", # 12C2..12C5 ; Ethiopic
- "Zzzz", # 12C6..12C7 ; Unknown
- "Ethi", # 12C8..12D6 ; Ethiopic
- "Zzzz", # 12D7..12D7 ; Unknown
- "Ethi", # 12D8..1310 ; Ethiopic
- "Zzzz", # 1311..1311 ; Unknown
- "Ethi", # 1312..1315 ; Ethiopic
- "Zzzz", # 1316..1317 ; Unknown
- "Ethi", # 1318..135A ; Ethiopic
- "Zzzz", # 135B..135C ; Unknown
- "Ethi", # 135D..137C ; Ethiopic
- "Zzzz", # 137D..137F ; Unknown
- "Ethi", # 1380..1399 ; Ethiopic
- "Zzzz", # 139A..139F ; Unknown
- "Cher", # 13A0..13F5 ; Cherokee
- "Zzzz", # 13F6..13F7 ; Unknown
- "Cher", # 13F8..13FD ; Cherokee
- "Zzzz", # 13FE..13FF ; Unknown
- "Cans", # 1400..167F ; Canadian_Aboriginal
- "Ogam", # 1680..169C ; Ogham
- "Zzzz", # 169D..169F ; Unknown
- "Runr", # 16A0..16EA ; Runic
- "Zyyy", # 16EB..16ED ; Common
- "Runr", # 16EE..16F8 ; Runic
- "Zzzz", # 16F9..16FF ; Unknown
- "Tglg", # 1700..1715 ; Tagalog
- "Zzzz", # 1716..171E ; Unknown
- "Tglg", # 171F..171F ; Tagalog
- "Hano", # 1720..1734 ; Hanunoo
- "Zyyy", # 1735..1736 ; Common
- "Zzzz", # 1737..173F ; Unknown
- "Buhd", # 1740..1753 ; Buhid
- "Zzzz", # 1754..175F ; Unknown
- "Tagb", # 1760..176C ; Tagbanwa
- "Zzzz", # 176D..176D ; Unknown
- "Tagb", # 176E..1770 ; Tagbanwa
- "Zzzz", # 1771..1771 ; Unknown
- "Tagb", # 1772..1773 ; Tagbanwa
- "Zzzz", # 1774..177F ; Unknown
- "Khmr", # 1780..17DD ; Khmer
- "Zzzz", # 17DE..17DF ; Unknown
- "Khmr", # 17E0..17E9 ; Khmer
- "Zzzz", # 17EA..17EF ; Unknown
- "Khmr", # 17F0..17F9 ; Khmer
- "Zzzz", # 17FA..17FF ; Unknown
- "Mong", # 1800..1801 ; Mongolian
- "Zyyy", # 1802..1803 ; Common
- "Mong", # 1804..1804 ; Mongolian
- "Zyyy", # 1805..1805 ; Common
- "Mong", # 1806..1819 ; Mongolian
- "Zzzz", # 181A..181F ; Unknown
- "Mong", # 1820..1878 ; Mongolian
- "Zzzz", # 1879..187F ; Unknown
- "Mong", # 1880..18AA ; Mongolian
- "Zzzz", # 18AB..18AF ; Unknown
- "Cans", # 18B0..18F5 ; Canadian_Aboriginal
- "Zzzz", # 18F6..18FF ; Unknown
- "Limb", # 1900..191E ; Limbu
- "Zzzz", # 191F..191F ; Unknown
- "Limb", # 1920..192B ; Limbu
- "Zzzz", # 192C..192F ; Unknown
- "Limb", # 1930..193B ; Limbu
- "Zzzz", # 193C..193F ; Unknown
- "Limb", # 1940..1940 ; Limbu
- "Zzzz", # 1941..1943 ; Unknown
- "Limb", # 1944..194F ; Limbu
- "Tale", # 1950..196D ; Tai_Le
- "Zzzz", # 196E..196F ; Unknown
- "Tale", # 1970..1974 ; Tai_Le
- "Zzzz", # 1975..197F ; Unknown
- "Talu", # 1980..19AB ; New_Tai_Lue
- "Zzzz", # 19AC..19AF ; Unknown
- "Talu", # 19B0..19C9 ; New_Tai_Lue
- "Zzzz", # 19CA..19CF ; Unknown
- "Talu", # 19D0..19DA ; New_Tai_Lue
- "Zzzz", # 19DB..19DD ; Unknown
- "Talu", # 19DE..19DF ; New_Tai_Lue
- "Khmr", # 19E0..19FF ; Khmer
- "Bugi", # 1A00..1A1B ; Buginese
- "Zzzz", # 1A1C..1A1D ; Unknown
- "Bugi", # 1A1E..1A1F ; Buginese
- "Lana", # 1A20..1A5E ; Tai_Tham
- "Zzzz", # 1A5F..1A5F ; Unknown
- "Lana", # 1A60..1A7C ; Tai_Tham
- "Zzzz", # 1A7D..1A7E ; Unknown
- "Lana", # 1A7F..1A89 ; Tai_Tham
- "Zzzz", # 1A8A..1A8F ; Unknown
- "Lana", # 1A90..1A99 ; Tai_Tham
- "Zzzz", # 1A9A..1A9F ; Unknown
- "Lana", # 1AA0..1AAD ; Tai_Tham
- "Zzzz", # 1AAE..1AAF ; Unknown
- "Zinh", # 1AB0..1ACE ; Inherited
- "Zzzz", # 1ACF..1AFF ; Unknown
- "Bali", # 1B00..1B4C ; Balinese
- "Zzzz", # 1B4D..1B4F ; Unknown
- "Bali", # 1B50..1B7E ; Balinese
- "Zzzz", # 1B7F..1B7F ; Unknown
- "Sund", # 1B80..1BBF ; Sundanese
- "Batk", # 1BC0..1BF3 ; Batak
- "Zzzz", # 1BF4..1BFB ; Unknown
- "Batk", # 1BFC..1BFF ; Batak
- "Lepc", # 1C00..1C37 ; Lepcha
- "Zzzz", # 1C38..1C3A ; Unknown
- "Lepc", # 1C3B..1C49 ; Lepcha
- "Zzzz", # 1C4A..1C4C ; Unknown
- "Lepc", # 1C4D..1C4F ; Lepcha
- "Olck", # 1C50..1C7F ; Ol_Chiki
- "Cyrl", # 1C80..1C88 ; Cyrillic
- "Zzzz", # 1C89..1C8F ; Unknown
- "Geor", # 1C90..1CBA ; Georgian
- "Zzzz", # 1CBB..1CBC ; Unknown
- "Geor", # 1CBD..1CBF ; Georgian
- "Sund", # 1CC0..1CC7 ; Sundanese
- "Zzzz", # 1CC8..1CCF ; Unknown
- "Zinh", # 1CD0..1CD2 ; Inherited
- "Zyyy", # 1CD3..1CD3 ; Common
- "Zinh", # 1CD4..1CE0 ; Inherited
- "Zyyy", # 1CE1..1CE1 ; Common
- "Zinh", # 1CE2..1CE8 ; Inherited
- "Zyyy", # 1CE9..1CEC ; Common
- "Zinh", # 1CED..1CED ; Inherited
- "Zyyy", # 1CEE..1CF3 ; Common
- "Zinh", # 1CF4..1CF4 ; Inherited
- "Zyyy", # 1CF5..1CF7 ; Common
- "Zinh", # 1CF8..1CF9 ; Inherited
- "Zyyy", # 1CFA..1CFA ; Common
- "Zzzz", # 1CFB..1CFF ; Unknown
- "Latn", # 1D00..1D25 ; Latin
- "Grek", # 1D26..1D2A ; Greek
- "Cyrl", # 1D2B..1D2B ; Cyrillic
- "Latn", # 1D2C..1D5C ; Latin
- "Grek", # 1D5D..1D61 ; Greek
- "Latn", # 1D62..1D65 ; Latin
- "Grek", # 1D66..1D6A ; Greek
- "Latn", # 1D6B..1D77 ; Latin
- "Cyrl", # 1D78..1D78 ; Cyrillic
- "Latn", # 1D79..1DBE ; Latin
- "Grek", # 1DBF..1DBF ; Greek
- "Zinh", # 1DC0..1DFF ; Inherited
- "Latn", # 1E00..1EFF ; Latin
- "Grek", # 1F00..1F15 ; Greek
- "Zzzz", # 1F16..1F17 ; Unknown
- "Grek", # 1F18..1F1D ; Greek
- "Zzzz", # 1F1E..1F1F ; Unknown
- "Grek", # 1F20..1F45 ; Greek
- "Zzzz", # 1F46..1F47 ; Unknown
- "Grek", # 1F48..1F4D ; Greek
- "Zzzz", # 1F4E..1F4F ; Unknown
- "Grek", # 1F50..1F57 ; Greek
- "Zzzz", # 1F58..1F58 ; Unknown
- "Grek", # 1F59..1F59 ; Greek
- "Zzzz", # 1F5A..1F5A ; Unknown
- "Grek", # 1F5B..1F5B ; Greek
- "Zzzz", # 1F5C..1F5C ; Unknown
- "Grek", # 1F5D..1F5D ; Greek
- "Zzzz", # 1F5E..1F5E ; Unknown
- "Grek", # 1F5F..1F7D ; Greek
- "Zzzz", # 1F7E..1F7F ; Unknown
- "Grek", # 1F80..1FB4 ; Greek
- "Zzzz", # 1FB5..1FB5 ; Unknown
- "Grek", # 1FB6..1FC4 ; Greek
- "Zzzz", # 1FC5..1FC5 ; Unknown
- "Grek", # 1FC6..1FD3 ; Greek
- "Zzzz", # 1FD4..1FD5 ; Unknown
- "Grek", # 1FD6..1FDB ; Greek
- "Zzzz", # 1FDC..1FDC ; Unknown
- "Grek", # 1FDD..1FEF ; Greek
- "Zzzz", # 1FF0..1FF1 ; Unknown
- "Grek", # 1FF2..1FF4 ; Greek
- "Zzzz", # 1FF5..1FF5 ; Unknown
- "Grek", # 1FF6..1FFE ; Greek
- "Zzzz", # 1FFF..1FFF ; Unknown
- "Zyyy", # 2000..200B ; Common
- "Zinh", # 200C..200D ; Inherited
- "Zyyy", # 200E..2064 ; Common
- "Zzzz", # 2065..2065 ; Unknown
- "Zyyy", # 2066..2070 ; Common
- "Latn", # 2071..2071 ; Latin
- "Zzzz", # 2072..2073 ; Unknown
- "Zyyy", # 2074..207E ; Common
- "Latn", # 207F..207F ; Latin
- "Zyyy", # 2080..208E ; Common
- "Zzzz", # 208F..208F ; Unknown
- "Latn", # 2090..209C ; Latin
- "Zzzz", # 209D..209F ; Unknown
- "Zyyy", # 20A0..20C0 ; Common
- "Zzzz", # 20C1..20CF ; Unknown
- "Zinh", # 20D0..20F0 ; Inherited
- "Zzzz", # 20F1..20FF ; Unknown
- "Zyyy", # 2100..2125 ; Common
- "Grek", # 2126..2126 ; Greek
- "Zyyy", # 2127..2129 ; Common
- "Latn", # 212A..212B ; Latin
- "Zyyy", # 212C..2131 ; Common
- "Latn", # 2132..2132 ; Latin
- "Zyyy", # 2133..214D ; Common
- "Latn", # 214E..214E ; Latin
- "Zyyy", # 214F..215F ; Common
- "Latn", # 2160..2188 ; Latin
- "Zyyy", # 2189..218B ; Common
- "Zzzz", # 218C..218F ; Unknown
- "Zyyy", # 2190..2426 ; Common
- "Zzzz", # 2427..243F ; Unknown
- "Zyyy", # 2440..244A ; Common
- "Zzzz", # 244B..245F ; Unknown
- "Zyyy", # 2460..27FF ; Common
- "Brai", # 2800..28FF ; Braille
- "Zyyy", # 2900..2B73 ; Common
- "Zzzz", # 2B74..2B75 ; Unknown
- "Zyyy", # 2B76..2B95 ; Common
- "Zzzz", # 2B96..2B96 ; Unknown
- "Zyyy", # 2B97..2BFF ; Common
- "Glag", # 2C00..2C5F ; Glagolitic
- "Latn", # 2C60..2C7F ; Latin
- "Copt", # 2C80..2CF3 ; Coptic
- "Zzzz", # 2CF4..2CF8 ; Unknown
- "Copt", # 2CF9..2CFF ; Coptic
- "Geor", # 2D00..2D25 ; Georgian
- "Zzzz", # 2D26..2D26 ; Unknown
- "Geor", # 2D27..2D27 ; Georgian
- "Zzzz", # 2D28..2D2C ; Unknown
- "Geor", # 2D2D..2D2D ; Georgian
- "Zzzz", # 2D2E..2D2F ; Unknown
- "Tfng", # 2D30..2D67 ; Tifinagh
- "Zzzz", # 2D68..2D6E ; Unknown
- "Tfng", # 2D6F..2D70 ; Tifinagh
- "Zzzz", # 2D71..2D7E ; Unknown
- "Tfng", # 2D7F..2D7F ; Tifinagh
- "Ethi", # 2D80..2D96 ; Ethiopic
- "Zzzz", # 2D97..2D9F ; Unknown
- "Ethi", # 2DA0..2DA6 ; Ethiopic
- "Zzzz", # 2DA7..2DA7 ; Unknown
- "Ethi", # 2DA8..2DAE ; Ethiopic
- "Zzzz", # 2DAF..2DAF ; Unknown
- "Ethi", # 2DB0..2DB6 ; Ethiopic
- "Zzzz", # 2DB7..2DB7 ; Unknown
- "Ethi", # 2DB8..2DBE ; Ethiopic
- "Zzzz", # 2DBF..2DBF ; Unknown
- "Ethi", # 2DC0..2DC6 ; Ethiopic
- "Zzzz", # 2DC7..2DC7 ; Unknown
- "Ethi", # 2DC8..2DCE ; Ethiopic
- "Zzzz", # 2DCF..2DCF ; Unknown
- "Ethi", # 2DD0..2DD6 ; Ethiopic
- "Zzzz", # 2DD7..2DD7 ; Unknown
- "Ethi", # 2DD8..2DDE ; Ethiopic
- "Zzzz", # 2DDF..2DDF ; Unknown
- "Cyrl", # 2DE0..2DFF ; Cyrillic
- "Zyyy", # 2E00..2E5D ; Common
- "Zzzz", # 2E5E..2E7F ; Unknown
- "Hani", # 2E80..2E99 ; Han
- "Zzzz", # 2E9A..2E9A ; Unknown
- "Hani", # 2E9B..2EF3 ; Han
- "Zzzz", # 2EF4..2EFF ; Unknown
- "Hani", # 2F00..2FD5 ; Han
- "Zzzz", # 2FD6..2FEF ; Unknown
- "Zyyy", # 2FF0..2FFB ; Common
- "Zzzz", # 2FFC..2FFF ; Unknown
- "Zyyy", # 3000..3004 ; Common
- "Hani", # 3005..3005 ; Han
- "Zyyy", # 3006..3006 ; Common
- "Hani", # 3007..3007 ; Han
- "Zyyy", # 3008..3020 ; Common
- "Hani", # 3021..3029 ; Han
- "Zinh", # 302A..302D ; Inherited
- "Hang", # 302E..302F ; Hangul
- "Zyyy", # 3030..3037 ; Common
- "Hani", # 3038..303B ; Han
- "Zyyy", # 303C..303F ; Common
- "Zzzz", # 3040..3040 ; Unknown
- "Hira", # 3041..3096 ; Hiragana
- "Zzzz", # 3097..3098 ; Unknown
- "Zinh", # 3099..309A ; Inherited
- "Zyyy", # 309B..309C ; Common
- "Hira", # 309D..309F ; Hiragana
- "Zyyy", # 30A0..30A0 ; Common
- "Kana", # 30A1..30FA ; Katakana
- "Zyyy", # 30FB..30FC ; Common
- "Kana", # 30FD..30FF ; Katakana
- "Zzzz", # 3100..3104 ; Unknown
- "Bopo", # 3105..312F ; Bopomofo
- "Zzzz", # 3130..3130 ; Unknown
- "Hang", # 3131..318E ; Hangul
- "Zzzz", # 318F..318F ; Unknown
- "Zyyy", # 3190..319F ; Common
- "Bopo", # 31A0..31BF ; Bopomofo
- "Zyyy", # 31C0..31E3 ; Common
- "Zzzz", # 31E4..31EF ; Unknown
- "Kana", # 31F0..31FF ; Katakana
- "Hang", # 3200..321E ; Hangul
- "Zzzz", # 321F..321F ; Unknown
- "Zyyy", # 3220..325F ; Common
- "Hang", # 3260..327E ; Hangul
- "Zyyy", # 327F..32CF ; Common
- "Kana", # 32D0..32FE ; Katakana
- "Zyyy", # 32FF..32FF ; Common
- "Kana", # 3300..3357 ; Katakana
- "Zyyy", # 3358..33FF ; Common
- "Hani", # 3400..4DBF ; Han
- "Zyyy", # 4DC0..4DFF ; Common
- "Hani", # 4E00..9FFF ; Han
- "Yiii", # A000..A48C ; Yi
- "Zzzz", # A48D..A48F ; Unknown
- "Yiii", # A490..A4C6 ; Yi
- "Zzzz", # A4C7..A4CF ; Unknown
- "Lisu", # A4D0..A4FF ; Lisu
- "Vaii", # A500..A62B ; Vai
- "Zzzz", # A62C..A63F ; Unknown
- "Cyrl", # A640..A69F ; Cyrillic
- "Bamu", # A6A0..A6F7 ; Bamum
- "Zzzz", # A6F8..A6FF ; Unknown
- "Zyyy", # A700..A721 ; Common
- "Latn", # A722..A787 ; Latin
- "Zyyy", # A788..A78A ; Common
- "Latn", # A78B..A7CA ; Latin
- "Zzzz", # A7CB..A7CF ; Unknown
- "Latn", # A7D0..A7D1 ; Latin
- "Zzzz", # A7D2..A7D2 ; Unknown
- "Latn", # A7D3..A7D3 ; Latin
- "Zzzz", # A7D4..A7D4 ; Unknown
- "Latn", # A7D5..A7D9 ; Latin
- "Zzzz", # A7DA..A7F1 ; Unknown
- "Latn", # A7F2..A7FF ; Latin
- "Sylo", # A800..A82C ; Syloti_Nagri
- "Zzzz", # A82D..A82F ; Unknown
- "Zyyy", # A830..A839 ; Common
- "Zzzz", # A83A..A83F ; Unknown
- "Phag", # A840..A877 ; Phags_Pa
- "Zzzz", # A878..A87F ; Unknown
- "Saur", # A880..A8C5 ; Saurashtra
- "Zzzz", # A8C6..A8CD ; Unknown
- "Saur", # A8CE..A8D9 ; Saurashtra
- "Zzzz", # A8DA..A8DF ; Unknown
- "Deva", # A8E0..A8FF ; Devanagari
- "Kali", # A900..A92D ; Kayah_Li
- "Zyyy", # A92E..A92E ; Common
- "Kali", # A92F..A92F ; Kayah_Li
- "Rjng", # A930..A953 ; Rejang
- "Zzzz", # A954..A95E ; Unknown
- "Rjng", # A95F..A95F ; Rejang
- "Hang", # A960..A97C ; Hangul
- "Zzzz", # A97D..A97F ; Unknown
- "Java", # A980..A9CD ; Javanese
- "Zzzz", # A9CE..A9CE ; Unknown
- "Zyyy", # A9CF..A9CF ; Common
- "Java", # A9D0..A9D9 ; Javanese
- "Zzzz", # A9DA..A9DD ; Unknown
- "Java", # A9DE..A9DF ; Javanese
- "Mymr", # A9E0..A9FE ; Myanmar
- "Zzzz", # A9FF..A9FF ; Unknown
- "Cham", # AA00..AA36 ; Cham
- "Zzzz", # AA37..AA3F ; Unknown
- "Cham", # AA40..AA4D ; Cham
- "Zzzz", # AA4E..AA4F ; Unknown
- "Cham", # AA50..AA59 ; Cham
- "Zzzz", # AA5A..AA5B ; Unknown
- "Cham", # AA5C..AA5F ; Cham
- "Mymr", # AA60..AA7F ; Myanmar
- "Tavt", # AA80..AAC2 ; Tai_Viet
- "Zzzz", # AAC3..AADA ; Unknown
- "Tavt", # AADB..AADF ; Tai_Viet
- "Mtei", # AAE0..AAF6 ; Meetei_Mayek
- "Zzzz", # AAF7..AB00 ; Unknown
- "Ethi", # AB01..AB06 ; Ethiopic
- "Zzzz", # AB07..AB08 ; Unknown
- "Ethi", # AB09..AB0E ; Ethiopic
- "Zzzz", # AB0F..AB10 ; Unknown
- "Ethi", # AB11..AB16 ; Ethiopic
- "Zzzz", # AB17..AB1F ; Unknown
- "Ethi", # AB20..AB26 ; Ethiopic
- "Zzzz", # AB27..AB27 ; Unknown
- "Ethi", # AB28..AB2E ; Ethiopic
- "Zzzz", # AB2F..AB2F ; Unknown
- "Latn", # AB30..AB5A ; Latin
- "Zyyy", # AB5B..AB5B ; Common
- "Latn", # AB5C..AB64 ; Latin
- "Grek", # AB65..AB65 ; Greek
- "Latn", # AB66..AB69 ; Latin
- "Zyyy", # AB6A..AB6B ; Common
- "Zzzz", # AB6C..AB6F ; Unknown
- "Cher", # AB70..ABBF ; Cherokee
- "Mtei", # ABC0..ABED ; Meetei_Mayek
- "Zzzz", # ABEE..ABEF ; Unknown
- "Mtei", # ABF0..ABF9 ; Meetei_Mayek
- "Zzzz", # ABFA..ABFF ; Unknown
- "Hang", # AC00..D7A3 ; Hangul
- "Zzzz", # D7A4..D7AF ; Unknown
- "Hang", # D7B0..D7C6 ; Hangul
- "Zzzz", # D7C7..D7CA ; Unknown
- "Hang", # D7CB..D7FB ; Hangul
- "Zzzz", # D7FC..F8FF ; Unknown
- "Hani", # F900..FA6D ; Han
- "Zzzz", # FA6E..FA6F ; Unknown
- "Hani", # FA70..FAD9 ; Han
- "Zzzz", # FADA..FAFF ; Unknown
- "Latn", # FB00..FB06 ; Latin
- "Zzzz", # FB07..FB12 ; Unknown
- "Armn", # FB13..FB17 ; Armenian
- "Zzzz", # FB18..FB1C ; Unknown
- "Hebr", # FB1D..FB36 ; Hebrew
- "Zzzz", # FB37..FB37 ; Unknown
- "Hebr", # FB38..FB3C ; Hebrew
- "Zzzz", # FB3D..FB3D ; Unknown
- "Hebr", # FB3E..FB3E ; Hebrew
- "Zzzz", # FB3F..FB3F ; Unknown
- "Hebr", # FB40..FB41 ; Hebrew
- "Zzzz", # FB42..FB42 ; Unknown
- "Hebr", # FB43..FB44 ; Hebrew
- "Zzzz", # FB45..FB45 ; Unknown
- "Hebr", # FB46..FB4F ; Hebrew
- "Arab", # FB50..FBC2 ; Arabic
- "Zzzz", # FBC3..FBD2 ; Unknown
- "Arab", # FBD3..FD3D ; Arabic
- "Zyyy", # FD3E..FD3F ; Common
- "Arab", # FD40..FD8F ; Arabic
- "Zzzz", # FD90..FD91 ; Unknown
- "Arab", # FD92..FDC7 ; Arabic
- "Zzzz", # FDC8..FDCE ; Unknown
- "Arab", # FDCF..FDCF ; Arabic
- "Zzzz", # FDD0..FDEF ; Unknown
- "Arab", # FDF0..FDFF ; Arabic
- "Zinh", # FE00..FE0F ; Inherited
- "Zyyy", # FE10..FE19 ; Common
- "Zzzz", # FE1A..FE1F ; Unknown
- "Zinh", # FE20..FE2D ; Inherited
- "Cyrl", # FE2E..FE2F ; Cyrillic
- "Zyyy", # FE30..FE52 ; Common
- "Zzzz", # FE53..FE53 ; Unknown
- "Zyyy", # FE54..FE66 ; Common
- "Zzzz", # FE67..FE67 ; Unknown
- "Zyyy", # FE68..FE6B ; Common
- "Zzzz", # FE6C..FE6F ; Unknown
- "Arab", # FE70..FE74 ; Arabic
- "Zzzz", # FE75..FE75 ; Unknown
- "Arab", # FE76..FEFC ; Arabic
- "Zzzz", # FEFD..FEFE ; Unknown
- "Zyyy", # FEFF..FEFF ; Common
- "Zzzz", # FF00..FF00 ; Unknown
- "Zyyy", # FF01..FF20 ; Common
- "Latn", # FF21..FF3A ; Latin
- "Zyyy", # FF3B..FF40 ; Common
- "Latn", # FF41..FF5A ; Latin
- "Zyyy", # FF5B..FF65 ; Common
- "Kana", # FF66..FF6F ; Katakana
- "Zyyy", # FF70..FF70 ; Common
- "Kana", # FF71..FF9D ; Katakana
- "Zyyy", # FF9E..FF9F ; Common
- "Hang", # FFA0..FFBE ; Hangul
- "Zzzz", # FFBF..FFC1 ; Unknown
- "Hang", # FFC2..FFC7 ; Hangul
- "Zzzz", # FFC8..FFC9 ; Unknown
- "Hang", # FFCA..FFCF ; Hangul
- "Zzzz", # FFD0..FFD1 ; Unknown
- "Hang", # FFD2..FFD7 ; Hangul
- "Zzzz", # FFD8..FFD9 ; Unknown
- "Hang", # FFDA..FFDC ; Hangul
- "Zzzz", # FFDD..FFDF ; Unknown
- "Zyyy", # FFE0..FFE6 ; Common
- "Zzzz", # FFE7..FFE7 ; Unknown
- "Zyyy", # FFE8..FFEE ; Common
- "Zzzz", # FFEF..FFF8 ; Unknown
- "Zyyy", # FFF9..FFFD ; Common
- "Zzzz", # FFFE..FFFF ; Unknown
- "Linb", # 10000..1000B ; Linear_B
- "Zzzz", # 1000C..1000C ; Unknown
- "Linb", # 1000D..10026 ; Linear_B
- "Zzzz", # 10027..10027 ; Unknown
- "Linb", # 10028..1003A ; Linear_B
- "Zzzz", # 1003B..1003B ; Unknown
- "Linb", # 1003C..1003D ; Linear_B
- "Zzzz", # 1003E..1003E ; Unknown
- "Linb", # 1003F..1004D ; Linear_B
- "Zzzz", # 1004E..1004F ; Unknown
- "Linb", # 10050..1005D ; Linear_B
- "Zzzz", # 1005E..1007F ; Unknown
- "Linb", # 10080..100FA ; Linear_B
- "Zzzz", # 100FB..100FF ; Unknown
- "Zyyy", # 10100..10102 ; Common
- "Zzzz", # 10103..10106 ; Unknown
- "Zyyy", # 10107..10133 ; Common
- "Zzzz", # 10134..10136 ; Unknown
- "Zyyy", # 10137..1013F ; Common
- "Grek", # 10140..1018E ; Greek
- "Zzzz", # 1018F..1018F ; Unknown
- "Zyyy", # 10190..1019C ; Common
- "Zzzz", # 1019D..1019F ; Unknown
- "Grek", # 101A0..101A0 ; Greek
- "Zzzz", # 101A1..101CF ; Unknown
- "Zyyy", # 101D0..101FC ; Common
- "Zinh", # 101FD..101FD ; Inherited
- "Zzzz", # 101FE..1027F ; Unknown
- "Lyci", # 10280..1029C ; Lycian
- "Zzzz", # 1029D..1029F ; Unknown
- "Cari", # 102A0..102D0 ; Carian
- "Zzzz", # 102D1..102DF ; Unknown
- "Zinh", # 102E0..102E0 ; Inherited
- "Zyyy", # 102E1..102FB ; Common
- "Zzzz", # 102FC..102FF ; Unknown
- "Ital", # 10300..10323 ; Old_Italic
- "Zzzz", # 10324..1032C ; Unknown
- "Ital", # 1032D..1032F ; Old_Italic
- "Goth", # 10330..1034A ; Gothic
- "Zzzz", # 1034B..1034F ; Unknown
- "Perm", # 10350..1037A ; Old_Permic
- "Zzzz", # 1037B..1037F ; Unknown
- "Ugar", # 10380..1039D ; Ugaritic
- "Zzzz", # 1039E..1039E ; Unknown
- "Ugar", # 1039F..1039F ; Ugaritic
- "Xpeo", # 103A0..103C3 ; Old_Persian
- "Zzzz", # 103C4..103C7 ; Unknown
- "Xpeo", # 103C8..103D5 ; Old_Persian
- "Zzzz", # 103D6..103FF ; Unknown
- "Dsrt", # 10400..1044F ; Deseret
- "Shaw", # 10450..1047F ; Shavian
- "Osma", # 10480..1049D ; Osmanya
- "Zzzz", # 1049E..1049F ; Unknown
- "Osma", # 104A0..104A9 ; Osmanya
- "Zzzz", # 104AA..104AF ; Unknown
- "Osge", # 104B0..104D3 ; Osage
- "Zzzz", # 104D4..104D7 ; Unknown
- "Osge", # 104D8..104FB ; Osage
- "Zzzz", # 104FC..104FF ; Unknown
- "Elba", # 10500..10527 ; Elbasan
- "Zzzz", # 10528..1052F ; Unknown
- "Aghb", # 10530..10563 ; Caucasian_Albanian
- "Zzzz", # 10564..1056E ; Unknown
- "Aghb", # 1056F..1056F ; Caucasian_Albanian
- "Vith", # 10570..1057A ; Vithkuqi
- "Zzzz", # 1057B..1057B ; Unknown
- "Vith", # 1057C..1058A ; Vithkuqi
- "Zzzz", # 1058B..1058B ; Unknown
- "Vith", # 1058C..10592 ; Vithkuqi
- "Zzzz", # 10593..10593 ; Unknown
- "Vith", # 10594..10595 ; Vithkuqi
- "Zzzz", # 10596..10596 ; Unknown
- "Vith", # 10597..105A1 ; Vithkuqi
- "Zzzz", # 105A2..105A2 ; Unknown
- "Vith", # 105A3..105B1 ; Vithkuqi
- "Zzzz", # 105B2..105B2 ; Unknown
- "Vith", # 105B3..105B9 ; Vithkuqi
- "Zzzz", # 105BA..105BA ; Unknown
- "Vith", # 105BB..105BC ; Vithkuqi
- "Zzzz", # 105BD..105FF ; Unknown
- "Lina", # 10600..10736 ; Linear_A
- "Zzzz", # 10737..1073F ; Unknown
- "Lina", # 10740..10755 ; Linear_A
- "Zzzz", # 10756..1075F ; Unknown
- "Lina", # 10760..10767 ; Linear_A
- "Zzzz", # 10768..1077F ; Unknown
- "Latn", # 10780..10785 ; Latin
- "Zzzz", # 10786..10786 ; Unknown
- "Latn", # 10787..107B0 ; Latin
- "Zzzz", # 107B1..107B1 ; Unknown
- "Latn", # 107B2..107BA ; Latin
- "Zzzz", # 107BB..107FF ; Unknown
- "Cprt", # 10800..10805 ; Cypriot
- "Zzzz", # 10806..10807 ; Unknown
- "Cprt", # 10808..10808 ; Cypriot
- "Zzzz", # 10809..10809 ; Unknown
- "Cprt", # 1080A..10835 ; Cypriot
- "Zzzz", # 10836..10836 ; Unknown
- "Cprt", # 10837..10838 ; Cypriot
- "Zzzz", # 10839..1083B ; Unknown
- "Cprt", # 1083C..1083C ; Cypriot
- "Zzzz", # 1083D..1083E ; Unknown
- "Cprt", # 1083F..1083F ; Cypriot
- "Armi", # 10840..10855 ; Imperial_Aramaic
- "Zzzz", # 10856..10856 ; Unknown
- "Armi", # 10857..1085F ; Imperial_Aramaic
- "Palm", # 10860..1087F ; Palmyrene
- "Nbat", # 10880..1089E ; Nabataean
- "Zzzz", # 1089F..108A6 ; Unknown
- "Nbat", # 108A7..108AF ; Nabataean
- "Zzzz", # 108B0..108DF ; Unknown
- "Hatr", # 108E0..108F2 ; Hatran
- "Zzzz", # 108F3..108F3 ; Unknown
- "Hatr", # 108F4..108F5 ; Hatran
- "Zzzz", # 108F6..108FA ; Unknown
- "Hatr", # 108FB..108FF ; Hatran
- "Phnx", # 10900..1091B ; Phoenician
- "Zzzz", # 1091C..1091E ; Unknown
- "Phnx", # 1091F..1091F ; Phoenician
- "Lydi", # 10920..10939 ; Lydian
- "Zzzz", # 1093A..1093E ; Unknown
- "Lydi", # 1093F..1093F ; Lydian
- "Zzzz", # 10940..1097F ; Unknown
- "Mero", # 10980..1099F ; Meroitic_Hieroglyphs
- "Merc", # 109A0..109B7 ; Meroitic_Cursive
- "Zzzz", # 109B8..109BB ; Unknown
- "Merc", # 109BC..109CF ; Meroitic_Cursive
- "Zzzz", # 109D0..109D1 ; Unknown
- "Merc", # 109D2..109FF ; Meroitic_Cursive
- "Khar", # 10A00..10A03 ; Kharoshthi
- "Zzzz", # 10A04..10A04 ; Unknown
- "Khar", # 10A05..10A06 ; Kharoshthi
- "Zzzz", # 10A07..10A0B ; Unknown
- "Khar", # 10A0C..10A13 ; Kharoshthi
- "Zzzz", # 10A14..10A14 ; Unknown
- "Khar", # 10A15..10A17 ; Kharoshthi
- "Zzzz", # 10A18..10A18 ; Unknown
- "Khar", # 10A19..10A35 ; Kharoshthi
- "Zzzz", # 10A36..10A37 ; Unknown
- "Khar", # 10A38..10A3A ; Kharoshthi
- "Zzzz", # 10A3B..10A3E ; Unknown
- "Khar", # 10A3F..10A48 ; Kharoshthi
- "Zzzz", # 10A49..10A4F ; Unknown
- "Khar", # 10A50..10A58 ; Kharoshthi
- "Zzzz", # 10A59..10A5F ; Unknown
- "Sarb", # 10A60..10A7F ; Old_South_Arabian
- "Narb", # 10A80..10A9F ; Old_North_Arabian
- "Zzzz", # 10AA0..10ABF ; Unknown
- "Mani", # 10AC0..10AE6 ; Manichaean
- "Zzzz", # 10AE7..10AEA ; Unknown
- "Mani", # 10AEB..10AF6 ; Manichaean
- "Zzzz", # 10AF7..10AFF ; Unknown
- "Avst", # 10B00..10B35 ; Avestan
- "Zzzz", # 10B36..10B38 ; Unknown
- "Avst", # 10B39..10B3F ; Avestan
- "Prti", # 10B40..10B55 ; Inscriptional_Parthian
- "Zzzz", # 10B56..10B57 ; Unknown
- "Prti", # 10B58..10B5F ; Inscriptional_Parthian
- "Phli", # 10B60..10B72 ; Inscriptional_Pahlavi
- "Zzzz", # 10B73..10B77 ; Unknown
- "Phli", # 10B78..10B7F ; Inscriptional_Pahlavi
- "Phlp", # 10B80..10B91 ; Psalter_Pahlavi
- "Zzzz", # 10B92..10B98 ; Unknown
- "Phlp", # 10B99..10B9C ; Psalter_Pahlavi
- "Zzzz", # 10B9D..10BA8 ; Unknown
- "Phlp", # 10BA9..10BAF ; Psalter_Pahlavi
- "Zzzz", # 10BB0..10BFF ; Unknown
- "Orkh", # 10C00..10C48 ; Old_Turkic
- "Zzzz", # 10C49..10C7F ; Unknown
- "Hung", # 10C80..10CB2 ; Old_Hungarian
- "Zzzz", # 10CB3..10CBF ; Unknown
- "Hung", # 10CC0..10CF2 ; Old_Hungarian
- "Zzzz", # 10CF3..10CF9 ; Unknown
- "Hung", # 10CFA..10CFF ; Old_Hungarian
- "Rohg", # 10D00..10D27 ; Hanifi_Rohingya
- "Zzzz", # 10D28..10D2F ; Unknown
- "Rohg", # 10D30..10D39 ; Hanifi_Rohingya
- "Zzzz", # 10D3A..10E5F ; Unknown
- "Arab", # 10E60..10E7E ; Arabic
- "Zzzz", # 10E7F..10E7F ; Unknown
- "Yezi", # 10E80..10EA9 ; Yezidi
- "Zzzz", # 10EAA..10EAA ; Unknown
- "Yezi", # 10EAB..10EAD ; Yezidi
- "Zzzz", # 10EAE..10EAF ; Unknown
- "Yezi", # 10EB0..10EB1 ; Yezidi
- "Zzzz", # 10EB2..10EFC ; Unknown
- "Arab", # 10EFD..10EFF ; Arabic
- "Sogo", # 10F00..10F27 ; Old_Sogdian
- "Zzzz", # 10F28..10F2F ; Unknown
- "Sogd", # 10F30..10F59 ; Sogdian
- "Zzzz", # 10F5A..10F6F ; Unknown
- "Ougr", # 10F70..10F89 ; Old_Uyghur
- "Zzzz", # 10F8A..10FAF ; Unknown
- "Chrs", # 10FB0..10FCB ; Chorasmian
- "Zzzz", # 10FCC..10FDF ; Unknown
- "Elym", # 10FE0..10FF6 ; Elymaic
- "Zzzz", # 10FF7..10FFF ; Unknown
- "Brah", # 11000..1104D ; Brahmi
- "Zzzz", # 1104E..11051 ; Unknown
- "Brah", # 11052..11075 ; Brahmi
- "Zzzz", # 11076..1107E ; Unknown
- "Brah", # 1107F..1107F ; Brahmi
- "Kthi", # 11080..110C2 ; Kaithi
- "Zzzz", # 110C3..110CC ; Unknown
- "Kthi", # 110CD..110CD ; Kaithi
- "Zzzz", # 110CE..110CF ; Unknown
- "Sora", # 110D0..110E8 ; Sora_Sompeng
- "Zzzz", # 110E9..110EF ; Unknown
- "Sora", # 110F0..110F9 ; Sora_Sompeng
- "Zzzz", # 110FA..110FF ; Unknown
- "Cakm", # 11100..11134 ; Chakma
- "Zzzz", # 11135..11135 ; Unknown
- "Cakm", # 11136..11147 ; Chakma
- "Zzzz", # 11148..1114F ; Unknown
- "Mahj", # 11150..11176 ; Mahajani
- "Zzzz", # 11177..1117F ; Unknown
- "Shrd", # 11180..111DF ; Sharada
- "Zzzz", # 111E0..111E0 ; Unknown
- "Sinh", # 111E1..111F4 ; Sinhala
- "Zzzz", # 111F5..111FF ; Unknown
- "Khoj", # 11200..11211 ; Khojki
- "Zzzz", # 11212..11212 ; Unknown
- "Khoj", # 11213..11241 ; Khojki
- "Zzzz", # 11242..1127F ; Unknown
- "Mult", # 11280..11286 ; Multani
- "Zzzz", # 11287..11287 ; Unknown
- "Mult", # 11288..11288 ; Multani
- "Zzzz", # 11289..11289 ; Unknown
- "Mult", # 1128A..1128D ; Multani
- "Zzzz", # 1128E..1128E ; Unknown
- "Mult", # 1128F..1129D ; Multani
- "Zzzz", # 1129E..1129E ; Unknown
- "Mult", # 1129F..112A9 ; Multani
- "Zzzz", # 112AA..112AF ; Unknown
- "Sind", # 112B0..112EA ; Khudawadi
- "Zzzz", # 112EB..112EF ; Unknown
- "Sind", # 112F0..112F9 ; Khudawadi
- "Zzzz", # 112FA..112FF ; Unknown
- "Gran", # 11300..11303 ; Grantha
- "Zzzz", # 11304..11304 ; Unknown
- "Gran", # 11305..1130C ; Grantha
- "Zzzz", # 1130D..1130E ; Unknown
- "Gran", # 1130F..11310 ; Grantha
- "Zzzz", # 11311..11312 ; Unknown
- "Gran", # 11313..11328 ; Grantha
- "Zzzz", # 11329..11329 ; Unknown
- "Gran", # 1132A..11330 ; Grantha
- "Zzzz", # 11331..11331 ; Unknown
- "Gran", # 11332..11333 ; Grantha
- "Zzzz", # 11334..11334 ; Unknown
- "Gran", # 11335..11339 ; Grantha
- "Zzzz", # 1133A..1133A ; Unknown
- "Zinh", # 1133B..1133B ; Inherited
- "Gran", # 1133C..11344 ; Grantha
- "Zzzz", # 11345..11346 ; Unknown
- "Gran", # 11347..11348 ; Grantha
- "Zzzz", # 11349..1134A ; Unknown
- "Gran", # 1134B..1134D ; Grantha
- "Zzzz", # 1134E..1134F ; Unknown
- "Gran", # 11350..11350 ; Grantha
- "Zzzz", # 11351..11356 ; Unknown
- "Gran", # 11357..11357 ; Grantha
- "Zzzz", # 11358..1135C ; Unknown
- "Gran", # 1135D..11363 ; Grantha
- "Zzzz", # 11364..11365 ; Unknown
- "Gran", # 11366..1136C ; Grantha
- "Zzzz", # 1136D..1136F ; Unknown
- "Gran", # 11370..11374 ; Grantha
- "Zzzz", # 11375..113FF ; Unknown
- "Newa", # 11400..1145B ; Newa
- "Zzzz", # 1145C..1145C ; Unknown
- "Newa", # 1145D..11461 ; Newa
- "Zzzz", # 11462..1147F ; Unknown
- "Tirh", # 11480..114C7 ; Tirhuta
- "Zzzz", # 114C8..114CF ; Unknown
- "Tirh", # 114D0..114D9 ; Tirhuta
- "Zzzz", # 114DA..1157F ; Unknown
- "Sidd", # 11580..115B5 ; Siddham
- "Zzzz", # 115B6..115B7 ; Unknown
- "Sidd", # 115B8..115DD ; Siddham
- "Zzzz", # 115DE..115FF ; Unknown
- "Modi", # 11600..11644 ; Modi
- "Zzzz", # 11645..1164F ; Unknown
- "Modi", # 11650..11659 ; Modi
- "Zzzz", # 1165A..1165F ; Unknown
- "Mong", # 11660..1166C ; Mongolian
- "Zzzz", # 1166D..1167F ; Unknown
- "Takr", # 11680..116B9 ; Takri
- "Zzzz", # 116BA..116BF ; Unknown
- "Takr", # 116C0..116C9 ; Takri
- "Zzzz", # 116CA..116FF ; Unknown
- "Ahom", # 11700..1171A ; Ahom
- "Zzzz", # 1171B..1171C ; Unknown
- "Ahom", # 1171D..1172B ; Ahom
- "Zzzz", # 1172C..1172F ; Unknown
- "Ahom", # 11730..11746 ; Ahom
- "Zzzz", # 11747..117FF ; Unknown
- "Dogr", # 11800..1183B ; Dogra
- "Zzzz", # 1183C..1189F ; Unknown
- "Wara", # 118A0..118F2 ; Warang_Citi
- "Zzzz", # 118F3..118FE ; Unknown
- "Wara", # 118FF..118FF ; Warang_Citi
- "Diak", # 11900..11906 ; Dives_Akuru
- "Zzzz", # 11907..11908 ; Unknown
- "Diak", # 11909..11909 ; Dives_Akuru
- "Zzzz", # 1190A..1190B ; Unknown
- "Diak", # 1190C..11913 ; Dives_Akuru
- "Zzzz", # 11914..11914 ; Unknown
- "Diak", # 11915..11916 ; Dives_Akuru
- "Zzzz", # 11917..11917 ; Unknown
- "Diak", # 11918..11935 ; Dives_Akuru
- "Zzzz", # 11936..11936 ; Unknown
- "Diak", # 11937..11938 ; Dives_Akuru
- "Zzzz", # 11939..1193A ; Unknown
- "Diak", # 1193B..11946 ; Dives_Akuru
- "Zzzz", # 11947..1194F ; Unknown
- "Diak", # 11950..11959 ; Dives_Akuru
- "Zzzz", # 1195A..1199F ; Unknown
- "Nand", # 119A0..119A7 ; Nandinagari
- "Zzzz", # 119A8..119A9 ; Unknown
- "Nand", # 119AA..119D7 ; Nandinagari
- "Zzzz", # 119D8..119D9 ; Unknown
- "Nand", # 119DA..119E4 ; Nandinagari
- "Zzzz", # 119E5..119FF ; Unknown
- "Zanb", # 11A00..11A47 ; Zanabazar_Square
- "Zzzz", # 11A48..11A4F ; Unknown
- "Soyo", # 11A50..11AA2 ; Soyombo
- "Zzzz", # 11AA3..11AAF ; Unknown
- "Cans", # 11AB0..11ABF ; Canadian_Aboriginal
- "Pauc", # 11AC0..11AF8 ; Pau_Cin_Hau
- "Zzzz", # 11AF9..11AFF ; Unknown
- "Deva", # 11B00..11B09 ; Devanagari
- "Zzzz", # 11B0A..11BFF ; Unknown
- "Bhks", # 11C00..11C08 ; Bhaiksuki
- "Zzzz", # 11C09..11C09 ; Unknown
- "Bhks", # 11C0A..11C36 ; Bhaiksuki
- "Zzzz", # 11C37..11C37 ; Unknown
- "Bhks", # 11C38..11C45 ; Bhaiksuki
- "Zzzz", # 11C46..11C4F ; Unknown
- "Bhks", # 11C50..11C6C ; Bhaiksuki
- "Zzzz", # 11C6D..11C6F ; Unknown
- "Marc", # 11C70..11C8F ; Marchen
- "Zzzz", # 11C90..11C91 ; Unknown
- "Marc", # 11C92..11CA7 ; Marchen
- "Zzzz", # 11CA8..11CA8 ; Unknown
- "Marc", # 11CA9..11CB6 ; Marchen
- "Zzzz", # 11CB7..11CFF ; Unknown
- "Gonm", # 11D00..11D06 ; Masaram_Gondi
- "Zzzz", # 11D07..11D07 ; Unknown
- "Gonm", # 11D08..11D09 ; Masaram_Gondi
- "Zzzz", # 11D0A..11D0A ; Unknown
- "Gonm", # 11D0B..11D36 ; Masaram_Gondi
- "Zzzz", # 11D37..11D39 ; Unknown
- "Gonm", # 11D3A..11D3A ; Masaram_Gondi
- "Zzzz", # 11D3B..11D3B ; Unknown
- "Gonm", # 11D3C..11D3D ; Masaram_Gondi
- "Zzzz", # 11D3E..11D3E ; Unknown
- "Gonm", # 11D3F..11D47 ; Masaram_Gondi
- "Zzzz", # 11D48..11D4F ; Unknown
- "Gonm", # 11D50..11D59 ; Masaram_Gondi
- "Zzzz", # 11D5A..11D5F ; Unknown
- "Gong", # 11D60..11D65 ; Gunjala_Gondi
- "Zzzz", # 11D66..11D66 ; Unknown
- "Gong", # 11D67..11D68 ; Gunjala_Gondi
- "Zzzz", # 11D69..11D69 ; Unknown
- "Gong", # 11D6A..11D8E ; Gunjala_Gondi
- "Zzzz", # 11D8F..11D8F ; Unknown
- "Gong", # 11D90..11D91 ; Gunjala_Gondi
- "Zzzz", # 11D92..11D92 ; Unknown
- "Gong", # 11D93..11D98 ; Gunjala_Gondi
- "Zzzz", # 11D99..11D9F ; Unknown
- "Gong", # 11DA0..11DA9 ; Gunjala_Gondi
- "Zzzz", # 11DAA..11EDF ; Unknown
- "Maka", # 11EE0..11EF8 ; Makasar
- "Zzzz", # 11EF9..11EFF ; Unknown
- "Kawi", # 11F00..11F10 ; Kawi
- "Zzzz", # 11F11..11F11 ; Unknown
- "Kawi", # 11F12..11F3A ; Kawi
- "Zzzz", # 11F3B..11F3D ; Unknown
- "Kawi", # 11F3E..11F59 ; Kawi
- "Zzzz", # 11F5A..11FAF ; Unknown
- "Lisu", # 11FB0..11FB0 ; Lisu
- "Zzzz", # 11FB1..11FBF ; Unknown
- "Taml", # 11FC0..11FF1 ; Tamil
- "Zzzz", # 11FF2..11FFE ; Unknown
- "Taml", # 11FFF..11FFF ; Tamil
- "Xsux", # 12000..12399 ; Cuneiform
- "Zzzz", # 1239A..123FF ; Unknown
- "Xsux", # 12400..1246E ; Cuneiform
- "Zzzz", # 1246F..1246F ; Unknown
- "Xsux", # 12470..12474 ; Cuneiform
- "Zzzz", # 12475..1247F ; Unknown
- "Xsux", # 12480..12543 ; Cuneiform
- "Zzzz", # 12544..12F8F ; Unknown
- "Cpmn", # 12F90..12FF2 ; Cypro_Minoan
- "Zzzz", # 12FF3..12FFF ; Unknown
- "Egyp", # 13000..13455 ; Egyptian_Hieroglyphs
- "Zzzz", # 13456..143FF ; Unknown
- "Hluw", # 14400..14646 ; Anatolian_Hieroglyphs
- "Zzzz", # 14647..167FF ; Unknown
- "Bamu", # 16800..16A38 ; Bamum
- "Zzzz", # 16A39..16A3F ; Unknown
- "Mroo", # 16A40..16A5E ; Mro
- "Zzzz", # 16A5F..16A5F ; Unknown
- "Mroo", # 16A60..16A69 ; Mro
- "Zzzz", # 16A6A..16A6D ; Unknown
- "Mroo", # 16A6E..16A6F ; Mro
- "Tnsa", # 16A70..16ABE ; Tangsa
- "Zzzz", # 16ABF..16ABF ; Unknown
- "Tnsa", # 16AC0..16AC9 ; Tangsa
- "Zzzz", # 16ACA..16ACF ; Unknown
- "Bass", # 16AD0..16AED ; Bassa_Vah
- "Zzzz", # 16AEE..16AEF ; Unknown
- "Bass", # 16AF0..16AF5 ; Bassa_Vah
- "Zzzz", # 16AF6..16AFF ; Unknown
- "Hmng", # 16B00..16B45 ; Pahawh_Hmong
- "Zzzz", # 16B46..16B4F ; Unknown
- "Hmng", # 16B50..16B59 ; Pahawh_Hmong
- "Zzzz", # 16B5A..16B5A ; Unknown
- "Hmng", # 16B5B..16B61 ; Pahawh_Hmong
- "Zzzz", # 16B62..16B62 ; Unknown
- "Hmng", # 16B63..16B77 ; Pahawh_Hmong
- "Zzzz", # 16B78..16B7C ; Unknown
- "Hmng", # 16B7D..16B8F ; Pahawh_Hmong
- "Zzzz", # 16B90..16E3F ; Unknown
- "Medf", # 16E40..16E9A ; Medefaidrin
- "Zzzz", # 16E9B..16EFF ; Unknown
- "Plrd", # 16F00..16F4A ; Miao
- "Zzzz", # 16F4B..16F4E ; Unknown
- "Plrd", # 16F4F..16F87 ; Miao
- "Zzzz", # 16F88..16F8E ; Unknown
- "Plrd", # 16F8F..16F9F ; Miao
- "Zzzz", # 16FA0..16FDF ; Unknown
- "Tang", # 16FE0..16FE0 ; Tangut
- "Nshu", # 16FE1..16FE1 ; Nushu
- "Hani", # 16FE2..16FE3 ; Han
- "Kits", # 16FE4..16FE4 ; Khitan_Small_Script
- "Zzzz", # 16FE5..16FEF ; Unknown
- "Hani", # 16FF0..16FF1 ; Han
- "Zzzz", # 16FF2..16FFF ; Unknown
- "Tang", # 17000..187F7 ; Tangut
- "Zzzz", # 187F8..187FF ; Unknown
- "Tang", # 18800..18AFF ; Tangut
- "Kits", # 18B00..18CD5 ; Khitan_Small_Script
- "Zzzz", # 18CD6..18CFF ; Unknown
- "Tang", # 18D00..18D08 ; Tangut
- "Zzzz", # 18D09..1AFEF ; Unknown
- "Kana", # 1AFF0..1AFF3 ; Katakana
- "Zzzz", # 1AFF4..1AFF4 ; Unknown
- "Kana", # 1AFF5..1AFFB ; Katakana
- "Zzzz", # 1AFFC..1AFFC ; Unknown
- "Kana", # 1AFFD..1AFFE ; Katakana
- "Zzzz", # 1AFFF..1AFFF ; Unknown
- "Kana", # 1B000..1B000 ; Katakana
- "Hira", # 1B001..1B11F ; Hiragana
- "Kana", # 1B120..1B122 ; Katakana
- "Zzzz", # 1B123..1B131 ; Unknown
- "Hira", # 1B132..1B132 ; Hiragana
- "Zzzz", # 1B133..1B14F ; Unknown
- "Hira", # 1B150..1B152 ; Hiragana
- "Zzzz", # 1B153..1B154 ; Unknown
- "Kana", # 1B155..1B155 ; Katakana
- "Zzzz", # 1B156..1B163 ; Unknown
- "Kana", # 1B164..1B167 ; Katakana
- "Zzzz", # 1B168..1B16F ; Unknown
- "Nshu", # 1B170..1B2FB ; Nushu
- "Zzzz", # 1B2FC..1BBFF ; Unknown
- "Dupl", # 1BC00..1BC6A ; Duployan
- "Zzzz", # 1BC6B..1BC6F ; Unknown
- "Dupl", # 1BC70..1BC7C ; Duployan
- "Zzzz", # 1BC7D..1BC7F ; Unknown
- "Dupl", # 1BC80..1BC88 ; Duployan
- "Zzzz", # 1BC89..1BC8F ; Unknown
- "Dupl", # 1BC90..1BC99 ; Duployan
- "Zzzz", # 1BC9A..1BC9B ; Unknown
- "Dupl", # 1BC9C..1BC9F ; Duployan
- "Zyyy", # 1BCA0..1BCA3 ; Common
- "Zzzz", # 1BCA4..1CEFF ; Unknown
- "Zinh", # 1CF00..1CF2D ; Inherited
- "Zzzz", # 1CF2E..1CF2F ; Unknown
- "Zinh", # 1CF30..1CF46 ; Inherited
- "Zzzz", # 1CF47..1CF4F ; Unknown
- "Zyyy", # 1CF50..1CFC3 ; Common
- "Zzzz", # 1CFC4..1CFFF ; Unknown
- "Zyyy", # 1D000..1D0F5 ; Common
- "Zzzz", # 1D0F6..1D0FF ; Unknown
- "Zyyy", # 1D100..1D126 ; Common
- "Zzzz", # 1D127..1D128 ; Unknown
- "Zyyy", # 1D129..1D166 ; Common
- "Zinh", # 1D167..1D169 ; Inherited
- "Zyyy", # 1D16A..1D17A ; Common
- "Zinh", # 1D17B..1D182 ; Inherited
- "Zyyy", # 1D183..1D184 ; Common
- "Zinh", # 1D185..1D18B ; Inherited
- "Zyyy", # 1D18C..1D1A9 ; Common
- "Zinh", # 1D1AA..1D1AD ; Inherited
- "Zyyy", # 1D1AE..1D1EA ; Common
- "Zzzz", # 1D1EB..1D1FF ; Unknown
- "Grek", # 1D200..1D245 ; Greek
- "Zzzz", # 1D246..1D2BF ; Unknown
- "Zyyy", # 1D2C0..1D2D3 ; Common
- "Zzzz", # 1D2D4..1D2DF ; Unknown
- "Zyyy", # 1D2E0..1D2F3 ; Common
- "Zzzz", # 1D2F4..1D2FF ; Unknown
- "Zyyy", # 1D300..1D356 ; Common
- "Zzzz", # 1D357..1D35F ; Unknown
- "Zyyy", # 1D360..1D378 ; Common
- "Zzzz", # 1D379..1D3FF ; Unknown
- "Zyyy", # 1D400..1D454 ; Common
- "Zzzz", # 1D455..1D455 ; Unknown
- "Zyyy", # 1D456..1D49C ; Common
- "Zzzz", # 1D49D..1D49D ; Unknown
- "Zyyy", # 1D49E..1D49F ; Common
- "Zzzz", # 1D4A0..1D4A1 ; Unknown
- "Zyyy", # 1D4A2..1D4A2 ; Common
- "Zzzz", # 1D4A3..1D4A4 ; Unknown
- "Zyyy", # 1D4A5..1D4A6 ; Common
- "Zzzz", # 1D4A7..1D4A8 ; Unknown
- "Zyyy", # 1D4A9..1D4AC ; Common
- "Zzzz", # 1D4AD..1D4AD ; Unknown
- "Zyyy", # 1D4AE..1D4B9 ; Common
- "Zzzz", # 1D4BA..1D4BA ; Unknown
- "Zyyy", # 1D4BB..1D4BB ; Common
- "Zzzz", # 1D4BC..1D4BC ; Unknown
- "Zyyy", # 1D4BD..1D4C3 ; Common
- "Zzzz", # 1D4C4..1D4C4 ; Unknown
- "Zyyy", # 1D4C5..1D505 ; Common
- "Zzzz", # 1D506..1D506 ; Unknown
- "Zyyy", # 1D507..1D50A ; Common
- "Zzzz", # 1D50B..1D50C ; Unknown
- "Zyyy", # 1D50D..1D514 ; Common
- "Zzzz", # 1D515..1D515 ; Unknown
- "Zyyy", # 1D516..1D51C ; Common
- "Zzzz", # 1D51D..1D51D ; Unknown
- "Zyyy", # 1D51E..1D539 ; Common
- "Zzzz", # 1D53A..1D53A ; Unknown
- "Zyyy", # 1D53B..1D53E ; Common
- "Zzzz", # 1D53F..1D53F ; Unknown
- "Zyyy", # 1D540..1D544 ; Common
- "Zzzz", # 1D545..1D545 ; Unknown
- "Zyyy", # 1D546..1D546 ; Common
- "Zzzz", # 1D547..1D549 ; Unknown
- "Zyyy", # 1D54A..1D550 ; Common
- "Zzzz", # 1D551..1D551 ; Unknown
- "Zyyy", # 1D552..1D6A5 ; Common
- "Zzzz", # 1D6A6..1D6A7 ; Unknown
- "Zyyy", # 1D6A8..1D7CB ; Common
- "Zzzz", # 1D7CC..1D7CD ; Unknown
- "Zyyy", # 1D7CE..1D7FF ; Common
- "Sgnw", # 1D800..1DA8B ; SignWriting
- "Zzzz", # 1DA8C..1DA9A ; Unknown
- "Sgnw", # 1DA9B..1DA9F ; SignWriting
- "Zzzz", # 1DAA0..1DAA0 ; Unknown
- "Sgnw", # 1DAA1..1DAAF ; SignWriting
- "Zzzz", # 1DAB0..1DEFF ; Unknown
- "Latn", # 1DF00..1DF1E ; Latin
- "Zzzz", # 1DF1F..1DF24 ; Unknown
- "Latn", # 1DF25..1DF2A ; Latin
- "Zzzz", # 1DF2B..1DFFF ; Unknown
- "Glag", # 1E000..1E006 ; Glagolitic
- "Zzzz", # 1E007..1E007 ; Unknown
- "Glag", # 1E008..1E018 ; Glagolitic
- "Zzzz", # 1E019..1E01A ; Unknown
- "Glag", # 1E01B..1E021 ; Glagolitic
- "Zzzz", # 1E022..1E022 ; Unknown
- "Glag", # 1E023..1E024 ; Glagolitic
- "Zzzz", # 1E025..1E025 ; Unknown
- "Glag", # 1E026..1E02A ; Glagolitic
- "Zzzz", # 1E02B..1E02F ; Unknown
- "Cyrl", # 1E030..1E06D ; Cyrillic
- "Zzzz", # 1E06E..1E08E ; Unknown
- "Cyrl", # 1E08F..1E08F ; Cyrillic
- "Zzzz", # 1E090..1E0FF ; Unknown
- "Hmnp", # 1E100..1E12C ; Nyiakeng_Puachue_Hmong
- "Zzzz", # 1E12D..1E12F ; Unknown
- "Hmnp", # 1E130..1E13D ; Nyiakeng_Puachue_Hmong
- "Zzzz", # 1E13E..1E13F ; Unknown
- "Hmnp", # 1E140..1E149 ; Nyiakeng_Puachue_Hmong
- "Zzzz", # 1E14A..1E14D ; Unknown
- "Hmnp", # 1E14E..1E14F ; Nyiakeng_Puachue_Hmong
- "Zzzz", # 1E150..1E28F ; Unknown
- "Toto", # 1E290..1E2AE ; Toto
- "Zzzz", # 1E2AF..1E2BF ; Unknown
- "Wcho", # 1E2C0..1E2F9 ; Wancho
- "Zzzz", # 1E2FA..1E2FE ; Unknown
- "Wcho", # 1E2FF..1E2FF ; Wancho
- "Zzzz", # 1E300..1E4CF ; Unknown
- "Nagm", # 1E4D0..1E4F9 ; Nag_Mundari
- "Zzzz", # 1E4FA..1E7DF ; Unknown
- "Ethi", # 1E7E0..1E7E6 ; Ethiopic
- "Zzzz", # 1E7E7..1E7E7 ; Unknown
- "Ethi", # 1E7E8..1E7EB ; Ethiopic
- "Zzzz", # 1E7EC..1E7EC ; Unknown
- "Ethi", # 1E7ED..1E7EE ; Ethiopic
- "Zzzz", # 1E7EF..1E7EF ; Unknown
- "Ethi", # 1E7F0..1E7FE ; Ethiopic
- "Zzzz", # 1E7FF..1E7FF ; Unknown
- "Mend", # 1E800..1E8C4 ; Mende_Kikakui
- "Zzzz", # 1E8C5..1E8C6 ; Unknown
- "Mend", # 1E8C7..1E8D6 ; Mende_Kikakui
- "Zzzz", # 1E8D7..1E8FF ; Unknown
- "Adlm", # 1E900..1E94B ; Adlam
- "Zzzz", # 1E94C..1E94F ; Unknown
- "Adlm", # 1E950..1E959 ; Adlam
- "Zzzz", # 1E95A..1E95D ; Unknown
- "Adlm", # 1E95E..1E95F ; Adlam
- "Zzzz", # 1E960..1EC70 ; Unknown
- "Zyyy", # 1EC71..1ECB4 ; Common
- "Zzzz", # 1ECB5..1ED00 ; Unknown
- "Zyyy", # 1ED01..1ED3D ; Common
- "Zzzz", # 1ED3E..1EDFF ; Unknown
- "Arab", # 1EE00..1EE03 ; Arabic
- "Zzzz", # 1EE04..1EE04 ; Unknown
- "Arab", # 1EE05..1EE1F ; Arabic
- "Zzzz", # 1EE20..1EE20 ; Unknown
- "Arab", # 1EE21..1EE22 ; Arabic
- "Zzzz", # 1EE23..1EE23 ; Unknown
- "Arab", # 1EE24..1EE24 ; Arabic
- "Zzzz", # 1EE25..1EE26 ; Unknown
- "Arab", # 1EE27..1EE27 ; Arabic
- "Zzzz", # 1EE28..1EE28 ; Unknown
- "Arab", # 1EE29..1EE32 ; Arabic
- "Zzzz", # 1EE33..1EE33 ; Unknown
- "Arab", # 1EE34..1EE37 ; Arabic
- "Zzzz", # 1EE38..1EE38 ; Unknown
- "Arab", # 1EE39..1EE39 ; Arabic
- "Zzzz", # 1EE3A..1EE3A ; Unknown
- "Arab", # 1EE3B..1EE3B ; Arabic
- "Zzzz", # 1EE3C..1EE41 ; Unknown
- "Arab", # 1EE42..1EE42 ; Arabic
- "Zzzz", # 1EE43..1EE46 ; Unknown
- "Arab", # 1EE47..1EE47 ; Arabic
- "Zzzz", # 1EE48..1EE48 ; Unknown
- "Arab", # 1EE49..1EE49 ; Arabic
- "Zzzz", # 1EE4A..1EE4A ; Unknown
- "Arab", # 1EE4B..1EE4B ; Arabic
- "Zzzz", # 1EE4C..1EE4C ; Unknown
- "Arab", # 1EE4D..1EE4F ; Arabic
- "Zzzz", # 1EE50..1EE50 ; Unknown
- "Arab", # 1EE51..1EE52 ; Arabic
- "Zzzz", # 1EE53..1EE53 ; Unknown
- "Arab", # 1EE54..1EE54 ; Arabic
- "Zzzz", # 1EE55..1EE56 ; Unknown
- "Arab", # 1EE57..1EE57 ; Arabic
- "Zzzz", # 1EE58..1EE58 ; Unknown
- "Arab", # 1EE59..1EE59 ; Arabic
- "Zzzz", # 1EE5A..1EE5A ; Unknown
- "Arab", # 1EE5B..1EE5B ; Arabic
- "Zzzz", # 1EE5C..1EE5C ; Unknown
- "Arab", # 1EE5D..1EE5D ; Arabic
- "Zzzz", # 1EE5E..1EE5E ; Unknown
- "Arab", # 1EE5F..1EE5F ; Arabic
- "Zzzz", # 1EE60..1EE60 ; Unknown
- "Arab", # 1EE61..1EE62 ; Arabic
- "Zzzz", # 1EE63..1EE63 ; Unknown
- "Arab", # 1EE64..1EE64 ; Arabic
- "Zzzz", # 1EE65..1EE66 ; Unknown
- "Arab", # 1EE67..1EE6A ; Arabic
- "Zzzz", # 1EE6B..1EE6B ; Unknown
- "Arab", # 1EE6C..1EE72 ; Arabic
- "Zzzz", # 1EE73..1EE73 ; Unknown
- "Arab", # 1EE74..1EE77 ; Arabic
- "Zzzz", # 1EE78..1EE78 ; Unknown
- "Arab", # 1EE79..1EE7C ; Arabic
- "Zzzz", # 1EE7D..1EE7D ; Unknown
- "Arab", # 1EE7E..1EE7E ; Arabic
- "Zzzz", # 1EE7F..1EE7F ; Unknown
- "Arab", # 1EE80..1EE89 ; Arabic
- "Zzzz", # 1EE8A..1EE8A ; Unknown
- "Arab", # 1EE8B..1EE9B ; Arabic
- "Zzzz", # 1EE9C..1EEA0 ; Unknown
- "Arab", # 1EEA1..1EEA3 ; Arabic
- "Zzzz", # 1EEA4..1EEA4 ; Unknown
- "Arab", # 1EEA5..1EEA9 ; Arabic
- "Zzzz", # 1EEAA..1EEAA ; Unknown
- "Arab", # 1EEAB..1EEBB ; Arabic
- "Zzzz", # 1EEBC..1EEEF ; Unknown
- "Arab", # 1EEF0..1EEF1 ; Arabic
- "Zzzz", # 1EEF2..1EFFF ; Unknown
- "Zyyy", # 1F000..1F02B ; Common
- "Zzzz", # 1F02C..1F02F ; Unknown
- "Zyyy", # 1F030..1F093 ; Common
- "Zzzz", # 1F094..1F09F ; Unknown
- "Zyyy", # 1F0A0..1F0AE ; Common
- "Zzzz", # 1F0AF..1F0B0 ; Unknown
- "Zyyy", # 1F0B1..1F0BF ; Common
- "Zzzz", # 1F0C0..1F0C0 ; Unknown
- "Zyyy", # 1F0C1..1F0CF ; Common
- "Zzzz", # 1F0D0..1F0D0 ; Unknown
- "Zyyy", # 1F0D1..1F0F5 ; Common
- "Zzzz", # 1F0F6..1F0FF ; Unknown
- "Zyyy", # 1F100..1F1AD ; Common
- "Zzzz", # 1F1AE..1F1E5 ; Unknown
- "Zyyy", # 1F1E6..1F1FF ; Common
- "Hira", # 1F200..1F200 ; Hiragana
- "Zyyy", # 1F201..1F202 ; Common
- "Zzzz", # 1F203..1F20F ; Unknown
- "Zyyy", # 1F210..1F23B ; Common
- "Zzzz", # 1F23C..1F23F ; Unknown
- "Zyyy", # 1F240..1F248 ; Common
- "Zzzz", # 1F249..1F24F ; Unknown
- "Zyyy", # 1F250..1F251 ; Common
- "Zzzz", # 1F252..1F25F ; Unknown
- "Zyyy", # 1F260..1F265 ; Common
- "Zzzz", # 1F266..1F2FF ; Unknown
- "Zyyy", # 1F300..1F6D7 ; Common
- "Zzzz", # 1F6D8..1F6DB ; Unknown
- "Zyyy", # 1F6DC..1F6EC ; Common
- "Zzzz", # 1F6ED..1F6EF ; Unknown
- "Zyyy", # 1F6F0..1F6FC ; Common
- "Zzzz", # 1F6FD..1F6FF ; Unknown
- "Zyyy", # 1F700..1F776 ; Common
- "Zzzz", # 1F777..1F77A ; Unknown
- "Zyyy", # 1F77B..1F7D9 ; Common
- "Zzzz", # 1F7DA..1F7DF ; Unknown
- "Zyyy", # 1F7E0..1F7EB ; Common
- "Zzzz", # 1F7EC..1F7EF ; Unknown
- "Zyyy", # 1F7F0..1F7F0 ; Common
- "Zzzz", # 1F7F1..1F7FF ; Unknown
- "Zyyy", # 1F800..1F80B ; Common
- "Zzzz", # 1F80C..1F80F ; Unknown
- "Zyyy", # 1F810..1F847 ; Common
- "Zzzz", # 1F848..1F84F ; Unknown
- "Zyyy", # 1F850..1F859 ; Common
- "Zzzz", # 1F85A..1F85F ; Unknown
- "Zyyy", # 1F860..1F887 ; Common
- "Zzzz", # 1F888..1F88F ; Unknown
- "Zyyy", # 1F890..1F8AD ; Common
- "Zzzz", # 1F8AE..1F8AF ; Unknown
- "Zyyy", # 1F8B0..1F8B1 ; Common
- "Zzzz", # 1F8B2..1F8FF ; Unknown
- "Zyyy", # 1F900..1FA53 ; Common
- "Zzzz", # 1FA54..1FA5F ; Unknown
- "Zyyy", # 1FA60..1FA6D ; Common
- "Zzzz", # 1FA6E..1FA6F ; Unknown
- "Zyyy", # 1FA70..1FA7C ; Common
- "Zzzz", # 1FA7D..1FA7F ; Unknown
- "Zyyy", # 1FA80..1FA88 ; Common
- "Zzzz", # 1FA89..1FA8F ; Unknown
- "Zyyy", # 1FA90..1FABD ; Common
- "Zzzz", # 1FABE..1FABE ; Unknown
- "Zyyy", # 1FABF..1FAC5 ; Common
- "Zzzz", # 1FAC6..1FACD ; Unknown
- "Zyyy", # 1FACE..1FADB ; Common
- "Zzzz", # 1FADC..1FADF ; Unknown
- "Zyyy", # 1FAE0..1FAE8 ; Common
- "Zzzz", # 1FAE9..1FAEF ; Unknown
- "Zyyy", # 1FAF0..1FAF8 ; Common
- "Zzzz", # 1FAF9..1FAFF ; Unknown
- "Zyyy", # 1FB00..1FB92 ; Common
- "Zzzz", # 1FB93..1FB93 ; Unknown
- "Zyyy", # 1FB94..1FBCA ; Common
- "Zzzz", # 1FBCB..1FBEF ; Unknown
- "Zyyy", # 1FBF0..1FBF9 ; Common
- "Zzzz", # 1FBFA..1FFFF ; Unknown
- "Hani", # 20000..2A6DF ; Han
- "Zzzz", # 2A6E0..2A6FF ; Unknown
- "Hani", # 2A700..2B739 ; Han
- "Zzzz", # 2B73A..2B73F ; Unknown
- "Hani", # 2B740..2B81D ; Han
- "Zzzz", # 2B81E..2B81F ; Unknown
- "Hani", # 2B820..2CEA1 ; Han
- "Zzzz", # 2CEA2..2CEAF ; Unknown
- "Hani", # 2CEB0..2EBE0 ; Han
- "Zzzz", # 2EBE1..2F7FF ; Unknown
- "Hani", # 2F800..2FA1D ; Han
- "Zzzz", # 2FA1E..2FFFF ; Unknown
- "Hani", # 30000..3134A ; Han
- "Zzzz", # 3134B..3134F ; Unknown
- "Hani", # 31350..323AF ; Han
- "Zzzz", # 323B0..E0000 ; Unknown
- "Zyyy", # E0001..E0001 ; Common
- "Zzzz", # E0002..E001F ; Unknown
- "Zyyy", # E0020..E007F ; Common
- "Zzzz", # E0080..E00FF ; Unknown
- "Zinh", # E0100..E01EF ; Inherited
- "Zzzz", # E01F0..10FFFF ; Unknown
-]
-
-NAMES = {
- "Adlm": "Adlam",
- "Aghb": "Caucasian_Albanian",
- "Ahom": "Ahom",
- "Arab": "Arabic",
- "Armi": "Imperial_Aramaic",
- "Armn": "Armenian",
- "Avst": "Avestan",
- "Bali": "Balinese",
- "Bamu": "Bamum",
- "Bass": "Bassa_Vah",
- "Batk": "Batak",
- "Beng": "Bengali",
- "Bhks": "Bhaiksuki",
- "Bopo": "Bopomofo",
- "Brah": "Brahmi",
- "Brai": "Braille",
- "Bugi": "Buginese",
- "Buhd": "Buhid",
- "Cakm": "Chakma",
- "Cans": "Canadian_Aboriginal",
- "Cari": "Carian",
- "Cham": "Cham",
- "Cher": "Cherokee",
- "Chrs": "Chorasmian",
- "Copt": "Coptic",
- "Cpmn": "Cypro_Minoan",
- "Cprt": "Cypriot",
- "Cyrl": "Cyrillic",
- "Deva": "Devanagari",
- "Diak": "Dives_Akuru",
- "Dogr": "Dogra",
- "Dsrt": "Deseret",
- "Dupl": "Duployan",
- "Egyp": "Egyptian_Hieroglyphs",
- "Elba": "Elbasan",
- "Elym": "Elymaic",
- "Ethi": "Ethiopic",
- "Geor": "Georgian",
- "Glag": "Glagolitic",
- "Gong": "Gunjala_Gondi",
- "Gonm": "Masaram_Gondi",
- "Goth": "Gothic",
- "Gran": "Grantha",
- "Grek": "Greek",
- "Gujr": "Gujarati",
- "Guru": "Gurmukhi",
- "Hang": "Hangul",
- "Hani": "Han",
- "Hano": "Hanunoo",
- "Hatr": "Hatran",
- "Hebr": "Hebrew",
- "Hira": "Hiragana",
- "Hluw": "Anatolian_Hieroglyphs",
- "Hmng": "Pahawh_Hmong",
- "Hmnp": "Nyiakeng_Puachue_Hmong",
- "Hrkt": "Katakana_Or_Hiragana",
- "Hung": "Old_Hungarian",
- "Ital": "Old_Italic",
- "Java": "Javanese",
- "Kali": "Kayah_Li",
- "Kana": "Katakana",
- "Kawi": "Kawi",
- "Khar": "Kharoshthi",
- "Khmr": "Khmer",
- "Khoj": "Khojki",
- "Kits": "Khitan_Small_Script",
- "Knda": "Kannada",
- "Kthi": "Kaithi",
- "Lana": "Tai_Tham",
- "Laoo": "Lao",
- "Latn": "Latin",
- "Lepc": "Lepcha",
- "Limb": "Limbu",
- "Lina": "Linear_A",
- "Linb": "Linear_B",
- "Lisu": "Lisu",
- "Lyci": "Lycian",
- "Lydi": "Lydian",
- "Mahj": "Mahajani",
- "Maka": "Makasar",
- "Mand": "Mandaic",
- "Mani": "Manichaean",
- "Marc": "Marchen",
- "Medf": "Medefaidrin",
- "Mend": "Mende_Kikakui",
- "Merc": "Meroitic_Cursive",
- "Mero": "Meroitic_Hieroglyphs",
- "Mlym": "Malayalam",
- "Modi": "Modi",
- "Mong": "Mongolian",
- "Mroo": "Mro",
- "Mtei": "Meetei_Mayek",
- "Mult": "Multani",
- "Mymr": "Myanmar",
- "Nagm": "Nag_Mundari",
- "Nand": "Nandinagari",
- "Narb": "Old_North_Arabian",
- "Nbat": "Nabataean",
- "Newa": "Newa",
- "Nkoo": "Nko",
- "Nshu": "Nushu",
- "Ogam": "Ogham",
- "Olck": "Ol_Chiki",
- "Orkh": "Old_Turkic",
- "Orya": "Oriya",
- "Osge": "Osage",
- "Osma": "Osmanya",
- "Ougr": "Old_Uyghur",
- "Palm": "Palmyrene",
- "Pauc": "Pau_Cin_Hau",
- "Perm": "Old_Permic",
- "Phag": "Phags_Pa",
- "Phli": "Inscriptional_Pahlavi",
- "Phlp": "Psalter_Pahlavi",
- "Phnx": "Phoenician",
- "Plrd": "Miao",
- "Prti": "Inscriptional_Parthian",
- "Rjng": "Rejang",
- "Rohg": "Hanifi_Rohingya",
- "Runr": "Runic",
- "Samr": "Samaritan",
- "Sarb": "Old_South_Arabian",
- "Saur": "Saurashtra",
- "Sgnw": "SignWriting",
- "Shaw": "Shavian",
- "Shrd": "Sharada",
- "Sidd": "Siddham",
- "Sind": "Khudawadi",
- "Sinh": "Sinhala",
- "Sogd": "Sogdian",
- "Sogo": "Old_Sogdian",
- "Sora": "Sora_Sompeng",
- "Soyo": "Soyombo",
- "Sund": "Sundanese",
- "Sylo": "Syloti_Nagri",
- "Syrc": "Syriac",
- "Tagb": "Tagbanwa",
- "Takr": "Takri",
- "Tale": "Tai_Le",
- "Talu": "New_Tai_Lue",
- "Taml": "Tamil",
- "Tang": "Tangut",
- "Tavt": "Tai_Viet",
- "Telu": "Telugu",
- "Tfng": "Tifinagh",
- "Tglg": "Tagalog",
- "Thaa": "Thaana",
- "Thai": "Thai",
- "Tibt": "Tibetan",
- "Tirh": "Tirhuta",
- "Tnsa": "Tangsa",
- "Toto": "Toto",
- "Ugar": "Ugaritic",
- "Vaii": "Vai",
- "Vith": "Vithkuqi",
- "Wara": "Warang_Citi",
- "Wcho": "Wancho",
- "Xpeo": "Old_Persian",
- "Xsux": "Cuneiform",
- "Yezi": "Yezidi",
- "Yiii": "Yi",
- "Zanb": "Zanabazar_Square",
- "Zinh": "Inherited",
- "Zyyy": "Common",
- "Zzzz": "Unknown",
-}
diff --git a/spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/fsspec/tests/abstract/put.py b/spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/fsspec/tests/abstract/put.py
deleted file mode 100644
index d06f9d9b53a2b2509596708b9e9fa55d7ea3599a..0000000000000000000000000000000000000000
--- a/spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/fsspec/tests/abstract/put.py
+++ /dev/null
@@ -1,397 +0,0 @@
-class AbstractPutTests:
- def test_put_file_to_existing_directory(
- self,
- fs,
- fs_join,
- fs_target,
- local_join,
- local_bulk_operations_scenario_0,
- ):
- # Copy scenario 1a
- source = local_bulk_operations_scenario_0
-
- target = fs_target
- fs.mkdir(target)
- if not self.supports_empty_directories():
- # Force target directory to exist by adding a dummy file
- fs.touch(fs_join(target, "dummy"))
- assert fs.isdir(target)
-
- target_file2 = fs_join(target, "file2")
- target_subfile1 = fs_join(target, "subfile1")
-
- # Copy from source directory
- fs.put(local_join(source, "file2"), target)
- assert fs.isfile(target_file2)
-
- # Copy from sub directory
- fs.put(local_join(source, "subdir", "subfile1"), target)
- assert fs.isfile(target_subfile1)
-
- # Remove copied files
- fs.rm([target_file2, target_subfile1])
- assert not fs.exists(target_file2)
- assert not fs.exists(target_subfile1)
-
- # Repeat with trailing slash on target
- fs.put(local_join(source, "file2"), target + "/")
- assert fs.isdir(target)
- assert fs.isfile(target_file2)
-
- fs.put(local_join(source, "subdir", "subfile1"), target + "/")
- assert fs.isfile(target_subfile1)
-
- def test_put_file_to_new_directory(
- self, fs, fs_join, fs_target, local_join, local_bulk_operations_scenario_0
- ):
- # Copy scenario 1b
- source = local_bulk_operations_scenario_0
-
- target = fs_target
- fs.mkdir(target)
-
- fs.put(
- local_join(source, "subdir", "subfile1"), fs_join(target, "newdir/")
- ) # Note trailing slash
- assert fs.isdir(target)
- assert fs.isdir(fs_join(target, "newdir"))
- assert fs.isfile(fs_join(target, "newdir", "subfile1"))
-
- def test_put_file_to_file_in_existing_directory(
- self, fs, fs_join, fs_target, local_join, local_bulk_operations_scenario_0
- ):
- # Copy scenario 1c
- source = local_bulk_operations_scenario_0
-
- target = fs_target
- fs.mkdir(target)
-
- fs.put(local_join(source, "subdir", "subfile1"), fs_join(target, "newfile"))
- assert fs.isfile(fs_join(target, "newfile"))
-
- def test_put_file_to_file_in_new_directory(
- self, fs, fs_join, fs_target, local_join, local_bulk_operations_scenario_0
- ):
- # Copy scenario 1d
- source = local_bulk_operations_scenario_0
-
- target = fs_target
- fs.mkdir(target)
-
- fs.put(
- local_join(source, "subdir", "subfile1"),
- fs_join(target, "newdir", "newfile"),
- )
- assert fs.isdir(fs_join(target, "newdir"))
- assert fs.isfile(fs_join(target, "newdir", "newfile"))
-
- def test_put_directory_to_existing_directory(
- self, fs, fs_join, fs_target, local_bulk_operations_scenario_0
- ):
- # Copy scenario 1e
- source = local_bulk_operations_scenario_0
-
- target = fs_target
- fs.mkdir(target)
- if not self.supports_empty_directories():
- # Force target directory to exist by adding a dummy file
- dummy = fs_join(target, "dummy")
- fs.touch(dummy)
- assert fs.isdir(target)
-
- for source_slash, target_slash in zip([False, True], [False, True]):
- s = fs_join(source, "subdir")
- if source_slash:
- s += "/"
- t = target + "/" if target_slash else target
-
- # Without recursive does nothing
- fs.put(s, t)
- assert fs.ls(target) == [] if self.supports_empty_directories() else [dummy]
-
- # With recursive
- fs.put(s, t, recursive=True)
- if source_slash:
- assert fs.isfile(fs_join(target, "subfile1"))
- assert fs.isfile(fs_join(target, "subfile2"))
- assert fs.isdir(fs_join(target, "nesteddir"))
- assert fs.isfile(fs_join(target, "nesteddir", "nestedfile"))
- assert not fs.exists(fs_join(target, "subdir"))
-
- fs.rm(fs.ls(target, detail=False), recursive=True)
- else:
- assert fs.isdir(fs_join(target, "subdir"))
- assert fs.isfile(fs_join(target, "subdir", "subfile1"))
- assert fs.isfile(fs_join(target, "subdir", "subfile2"))
- assert fs.isdir(fs_join(target, "subdir", "nesteddir"))
- assert fs.isfile(fs_join(target, "subdir", "nesteddir", "nestedfile"))
-
- fs.rm(fs_join(target, "subdir"), recursive=True)
- assert fs.ls(target) == [] if self.supports_empty_directories() else [dummy]
-
- # Limit recursive by maxdepth
- fs.put(s, t, recursive=True, maxdepth=1)
- if source_slash:
- assert fs.isfile(fs_join(target, "subfile1"))
- assert fs.isfile(fs_join(target, "subfile2"))
- assert not fs.exists(fs_join(target, "nesteddir"))
- assert not fs.exists(fs_join(target, "subdir"))
-
- fs.rm(fs.ls(target, detail=False), recursive=True)
- else:
- assert fs.isdir(fs_join(target, "subdir"))
- assert fs.isfile(fs_join(target, "subdir", "subfile1"))
- assert fs.isfile(fs_join(target, "subdir", "subfile2"))
- assert not fs.exists(fs_join(target, "subdir", "nesteddir"))
-
- fs.rm(fs_join(target, "subdir"), recursive=True)
- assert fs.ls(target) == [] if self.supports_empty_directories() else [dummy]
-
- def test_put_directory_to_new_directory(
- self, fs, fs_join, fs_target, local_bulk_operations_scenario_0
- ):
- # Copy scenario 1f
- source = local_bulk_operations_scenario_0
-
- target = fs_target
- fs.mkdir(target)
- if not self.supports_empty_directories():
- # Force target directory to exist by adding a dummy file
- dummy = fs_join(target, "dummy")
- fs.touch(dummy)
- assert fs.isdir(target)
-
- for source_slash, target_slash in zip([False, True], [False, True]):
- s = fs_join(source, "subdir")
- if source_slash:
- s += "/"
- t = fs_join(target, "newdir")
- if target_slash:
- t += "/"
-
- # Without recursive does nothing
- fs.put(s, t)
- assert fs.ls(target) == [] if self.supports_empty_directories() else [dummy]
-
- # With recursive
- fs.put(s, t, recursive=True)
- assert fs.isdir(fs_join(target, "newdir"))
- assert fs.isfile(fs_join(target, "newdir", "subfile1"))
- assert fs.isfile(fs_join(target, "newdir", "subfile2"))
- assert fs.isdir(fs_join(target, "newdir", "nesteddir"))
- assert fs.isfile(fs_join(target, "newdir", "nesteddir", "nestedfile"))
- assert not fs.exists(fs_join(target, "subdir"))
-
- fs.rm(fs_join(target, "newdir"), recursive=True)
- assert not fs.exists(fs_join(target, "newdir"))
-
- # Limit recursive by maxdepth
- fs.put(s, t, recursive=True, maxdepth=1)
- assert fs.isdir(fs_join(target, "newdir"))
- assert fs.isfile(fs_join(target, "newdir", "subfile1"))
- assert fs.isfile(fs_join(target, "newdir", "subfile2"))
- assert not fs.exists(fs_join(target, "newdir", "nesteddir"))
- assert not fs.exists(fs_join(target, "subdir"))
-
- fs.rm(fs_join(target, "newdir"), recursive=True)
- assert not fs.exists(fs_join(target, "newdir"))
-
- def test_put_glob_to_existing_directory(
- self, fs, fs_join, fs_target, local_join, local_bulk_operations_scenario_0
- ):
- # Copy scenario 1g
- source = local_bulk_operations_scenario_0
-
- target = fs_target
- fs.mkdir(target)
- if not self.supports_empty_directories():
- # Force target directory to exist by adding a dummy file
- dummy = fs_join(target, "dummy")
- fs.touch(dummy)
- assert fs.isdir(target)
-
- for target_slash in [False, True]:
- t = target + "/" if target_slash else target
-
- # Without recursive
- fs.put(local_join(source, "subdir", "*"), t)
- assert fs.isfile(fs_join(target, "subfile1"))
- assert fs.isfile(fs_join(target, "subfile2"))
- assert not fs.isdir(fs_join(target, "nesteddir"))
- assert not fs.exists(fs_join(target, "nesteddir", "nestedfile"))
- assert not fs.exists(fs_join(target, "subdir"))
-
- fs.rm(fs.ls(target, detail=False), recursive=True)
- assert fs.ls(target) == [] if self.supports_empty_directories() else [dummy]
-
- # With recursive
- fs.put(local_join(source, "subdir", "*"), t, recursive=True)
- assert fs.isfile(fs_join(target, "subfile1"))
- assert fs.isfile(fs_join(target, "subfile2"))
- assert fs.isdir(fs_join(target, "nesteddir"))
- assert fs.isfile(fs_join(target, "nesteddir", "nestedfile"))
- assert not fs.exists(fs_join(target, "subdir"))
-
- fs.rm(fs.ls(target, detail=False), recursive=True)
- assert fs.ls(target) == [] if self.supports_empty_directories() else [dummy]
-
- # Limit recursive by maxdepth
- fs.put(local_join(source, "subdir", "*"), t, recursive=True, maxdepth=1)
- assert fs.isfile(fs_join(target, "subfile1"))
- assert fs.isfile(fs_join(target, "subfile2"))
- assert not fs.exists(fs_join(target, "nesteddir"))
- assert not fs.exists(fs_join(target, "subdir"))
-
- fs.rm(fs.ls(target, detail=False), recursive=True)
- assert fs.ls(target) == [] if self.supports_empty_directories() else [dummy]
-
- def test_put_glob_to_new_directory(
- self, fs, fs_join, fs_target, local_join, local_bulk_operations_scenario_0
- ):
- # Copy scenario 1h
- source = local_bulk_operations_scenario_0
-
- target = fs_target
- fs.mkdir(target)
- if not self.supports_empty_directories():
- # Force target directory to exist by adding a dummy file
- dummy = fs_join(target, "dummy")
- fs.touch(dummy)
- assert fs.isdir(target)
-
- for target_slash in [False, True]:
- t = fs_join(target, "newdir")
- if target_slash:
- t += "/"
-
- # Without recursive
- fs.put(local_join(source, "subdir", "*"), t)
- assert fs.isdir(fs_join(target, "newdir"))
- assert fs.isfile(fs_join(target, "newdir", "subfile1"))
- assert fs.isfile(fs_join(target, "newdir", "subfile2"))
- assert not fs.exists(fs_join(target, "newdir", "nesteddir"))
- assert not fs.exists(fs_join(target, "newdir", "nesteddir", "nestedfile"))
- assert not fs.exists(fs_join(target, "subdir"))
- assert not fs.exists(fs_join(target, "newdir", "subdir"))
-
- fs.rm(fs_join(target, "newdir"), recursive=True)
- assert not fs.exists(fs_join(target, "newdir"))
-
- # With recursive
- fs.put(local_join(source, "subdir", "*"), t, recursive=True)
- assert fs.isdir(fs_join(target, "newdir"))
- assert fs.isfile(fs_join(target, "newdir", "subfile1"))
- assert fs.isfile(fs_join(target, "newdir", "subfile2"))
- assert fs.isdir(fs_join(target, "newdir", "nesteddir"))
- assert fs.isfile(fs_join(target, "newdir", "nesteddir", "nestedfile"))
- assert not fs.exists(fs_join(target, "subdir"))
- assert not fs.exists(fs_join(target, "newdir", "subdir"))
-
- fs.rm(fs_join(target, "newdir"), recursive=True)
- assert not fs.exists(fs_join(target, "newdir"))
-
- # Limit recursive by maxdepth
- fs.put(local_join(source, "subdir", "*"), t, recursive=True, maxdepth=1)
- assert fs.isdir(fs_join(target, "newdir"))
- assert fs.isfile(fs_join(target, "newdir", "subfile1"))
- assert fs.isfile(fs_join(target, "newdir", "subfile2"))
- assert not fs.exists(fs_join(target, "newdir", "nesteddir"))
- assert not fs.exists(fs_join(target, "subdir"))
- assert not fs.exists(fs_join(target, "newdir", "subdir"))
-
- fs.rm(fs_join(target, "newdir"), recursive=True)
- assert not fs.exists(fs_join(target, "newdir"))
-
- def test_put_list_of_files_to_existing_directory(
- self,
- fs,
- fs_join,
- fs_target,
- local_join,
- local_bulk_operations_scenario_0,
- fs_path,
- ):
- # Copy scenario 2a
- source = local_bulk_operations_scenario_0
-
- target = fs_target
- fs.mkdir(target)
- if not self.supports_empty_directories():
- # Force target directory to exist by adding a dummy file
- dummy = fs_join(target, "dummy")
- fs.touch(dummy)
- assert fs.isdir(target)
-
- source_files = [
- local_join(source, "file1"),
- local_join(source, "file2"),
- local_join(source, "subdir", "subfile1"),
- ]
-
- for target_slash in [False, True]:
- t = target + "/" if target_slash else target
-
- fs.put(source_files, t)
- assert fs.isfile(fs_join(target, "file1"))
- assert fs.isfile(fs_join(target, "file2"))
- assert fs.isfile(fs_join(target, "subfile1"))
-
- fs.rm(fs.find(target))
- assert fs.ls(target) == [] if self.supports_empty_directories() else [dummy]
-
- def test_put_list_of_files_to_new_directory(
- self, fs, fs_join, fs_target, local_join, local_bulk_operations_scenario_0
- ):
- # Copy scenario 2b
- source = local_bulk_operations_scenario_0
-
- target = fs_target
- fs.mkdir(target)
-
- source_files = [
- local_join(source, "file1"),
- local_join(source, "file2"),
- local_join(source, "subdir", "subfile1"),
- ]
-
- fs.put(source_files, fs_join(target, "newdir") + "/") # Note trailing slash
- assert fs.isdir(fs_join(target, "newdir"))
- assert fs.isfile(fs_join(target, "newdir", "file1"))
- assert fs.isfile(fs_join(target, "newdir", "file2"))
- assert fs.isfile(fs_join(target, "newdir", "subfile1"))
-
- def test_put_directory_recursive(
- self, fs, fs_join, fs_target, local_fs, local_join, local_path
- ):
- # https://github.com/fsspec/filesystem_spec/issues/1062
- # Recursive cp/get/put of source directory into non-existent target directory.
- src = local_join(local_path, "src")
- src_file = local_join(src, "file")
- local_fs.mkdir(src)
- local_fs.touch(src_file)
-
- target = fs_target
-
- # put without slash
- assert not fs.exists(target)
- for loop in range(2):
- fs.put(src, target, recursive=True)
- assert fs.isdir(target)
-
- if loop == 0:
- assert fs.isfile(fs_join(target, "file"))
- assert not fs.exists(fs_join(target, "src"))
- else:
- assert fs.isfile(fs_join(target, "file"))
- assert fs.isdir(fs_join(target, "src"))
- assert fs.isfile(fs_join(target, "src", "file"))
-
- fs.rm(target, recursive=True)
-
- # put with slash
- assert not fs.exists(target)
- for loop in range(2):
- fs.put(src + "/", target, recursive=True)
- assert fs.isdir(target)
- assert fs.isfile(fs_join(target, "file"))
- assert not fs.exists(fs_join(target, "src"))
diff --git a/spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/gradio/components/model3d.py b/spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/gradio/components/model3d.py
deleted file mode 100644
index aed05a215df88747e60450bbe8e16b38dce60598..0000000000000000000000000000000000000000
--- a/spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/gradio/components/model3d.py
+++ /dev/null
@@ -1,155 +0,0 @@
-"""gr.Model3D() component."""
-
-from __future__ import annotations
-
-from pathlib import Path
-from typing import Any, Callable, Literal
-
-from gradio_client import media_data
-from gradio_client.documentation import document, set_documentation_group
-from gradio_client.serializing import FileSerializable
-
-from gradio.components.base import IOComponent, _Keywords
-from gradio.events import (
- Changeable,
- Clearable,
- Editable,
- Uploadable,
-)
-
-set_documentation_group("component")
-
-
-@document()
-class Model3D(
- Changeable, Uploadable, Editable, Clearable, IOComponent, FileSerializable
-):
- """
- Component allows users to upload or view 3D Model files (.obj, .glb, or .gltf).
- Preprocessing: This component passes the uploaded file as a {str}filepath.
- Postprocessing: expects function to return a {str} or {pathlib.Path} filepath of type (.obj, glb, or .gltf)
-
- Demos: model3D
- Guides: how-to-use-3D-model-component
- """
-
- def __init__(
- self,
- value: str | Callable | None = None,
- *,
- clear_color: list[float] | None = None,
- label: str | None = None,
- every: float | None = None,
- show_label: bool | None = None,
- container: bool = True,
- scale: int | None = None,
- min_width: int = 160,
- visible: bool = True,
- elem_id: str | None = None,
- elem_classes: list[str] | str | None = None,
- **kwargs,
- ):
- """
- Parameters:
- value: path to (.obj, glb, or .gltf) file to show in model3D viewer. If callable, the function will be called whenever the app loads to set the initial value of the component.
- clear_color: background color of scene
- label: component name in interface.
- every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
- show_label: if True, will display label.
- container: If True, will place the component in a container - providing some extra padding around the border.
- scale: relative width compared to adjacent Components in a Row. For example, if Component A has scale=2, and Component B has scale=1, A will be twice as wide as B. Should be an integer.
- min_width: minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.
- visible: If False, component will be hidden.
- elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
- elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
- """
- self.clear_color = clear_color or [0, 0, 0, 0]
- IOComponent.__init__(
- self,
- label=label,
- every=every,
- show_label=show_label,
- container=container,
- scale=scale,
- min_width=min_width,
- visible=visible,
- elem_id=elem_id,
- elem_classes=elem_classes,
- value=value,
- **kwargs,
- )
-
- def get_config(self):
- return {
- "clearColor": self.clear_color,
- "value": self.value,
- **IOComponent.get_config(self),
- }
-
- def example_inputs(self) -> dict[str, Any]:
- return {
- "raw": {"is_file": False, "data": media_data.BASE64_MODEL3D},
- "serialized": "https://github.com/gradio-app/gradio/raw/main/test/test_files/Box.gltf",
- }
-
- @staticmethod
- def update(
- value: Any | Literal[_Keywords.NO_VALUE] | None = _Keywords.NO_VALUE,
- label: str | None = None,
- show_label: bool | None = None,
- container: bool | None = None,
- scale: int | None = None,
- min_width: int | None = None,
- visible: bool | None = None,
- ):
- updated_config = {
- "label": label,
- "show_label": show_label,
- "container": container,
- "scale": scale,
- "min_width": min_width,
- "visible": visible,
- "value": value,
- "__type__": "update",
- }
- return updated_config
-
- def preprocess(self, x: dict[str, str] | None) -> str | None:
- """
- Parameters:
- x: JSON object with filename as 'name' property and base64 data as 'data' property
- Returns:
- string file path to temporary file with the 3D image model
- """
- if x is None:
- return x
- file_name, file_data, is_file = (
- x["name"],
- x["data"],
- x.get("is_file", False),
- )
- if is_file:
- temp_file_path = self.make_temp_copy_if_needed(file_name)
- else:
- temp_file_path = self.base64_to_temp_file_if_needed(file_data, file_name)
-
- return temp_file_path
-
- def postprocess(self, y: str | Path | None) -> dict[str, str] | None:
- """
- Parameters:
- y: path to the model
- Returns:
- file name mapped to base64 url data
- """
- if y is None:
- return y
- data = {
- "name": self.make_temp_copy_if_needed(y),
- "data": None,
- "is_file": True,
- }
- return data
-
- def as_example(self, input_data: str | None) -> str:
- return Path(input_data).name if input_data else ""
diff --git a/spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/gradio/templates/cdn/assets/index-f2292b12.css b/spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/gradio/templates/cdn/assets/index-f2292b12.css
deleted file mode 100644
index 56c1181476ccd4397e8e5f8f431e83730eb40354..0000000000000000000000000000000000000000
--- a/spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/gradio/templates/cdn/assets/index-f2292b12.css
+++ /dev/null
@@ -1 +0,0 @@
-.gradio-container-3-37-0,.gradio-container-3-37-0 *,.gradio-container-3-37-0 :before,.gradio-container-3-37-0 :after{box-sizing:border-box;border-width:0;border-style:solid}.gradio-container-3-37-0 html{-webkit-text-size-adjust:100%;line-height:1.5;font-family:var(--font-sans);-moz-tab-size:4;tab-size:2}.gradio-container-3-37-0 body{margin:0;line-height:inherit}.gradio-container-3-37-0 hr{border-top-width:1px;height:0;color:inherit}.gradio-container-3-37-0 abbr:where([title]){text-decoration:underline dotted}.gradio-container-3-37-0 h1,.gradio-container-3-37-0 h2,.gradio-container-3-37-0 h3,.gradio-container-3-37-0 h4,.gradio-container-3-37-0 h5,.gradio-container-3-37-0 h6{font-weight:inherit;font-size:inherit}.gradio-container-3-37-0 a{color:inherit;text-decoration:inherit}.gradio-container-3-37-0 b,.gradio-container-3-37-0 strong{font-weight:bolder}.gradio-container-3-37-0 code,.gradio-container-3-37-0 kbd,.gradio-container-3-37-0 samp,.gradio-container-3-37-0 pre{font-family:-var(--font-mono)}.gradio-container-3-37-0 small{font-size:80%}.gradio-container-3-37-0 sub,.gradio-container-3-37-0 sup{position:relative;vertical-align:baseline;font-size:75%;line-height:0}.gradio-container-3-37-0 sub{bottom:-.25em}.gradio-container-3-37-0 sup{top:-.5em}.gradio-container-3-37-0 table{border-color:inherit;border-collapse:collapse;text-indent:0}.gradio-container-3-37-0 button,.gradio-container-3-37-0 input,.gradio-container-3-37-0 optgroup,.gradio-container-3-37-0 select,.gradio-container-3-37-0 textarea{margin:0;padding:0;color:inherit;font-weight:inherit;font-size:100%;line-height:inherit;font-family:inherit}.gradio-container-3-37-0 button,.gradio-container-3-37-0 select{text-transform:none}.gradio-container-3-37-0 button,.gradio-container-3-37-0 [type=button],.gradio-container-3-37-0 [type=reset],.gradio-container-3-37-0 [type=submit]{-webkit-appearance:button;background-image:none;background-color:transparent}.gradio-container-3-37-0 :-moz-focusring{outline:auto}.gradio-container-3-37-0 :-moz-ui-invalid{box-shadow:none}.gradio-container-3-37-0 progress{vertical-align:baseline}.gradio-container-3-37-0 ::-webkit-inner-spin-button,.gradio-container-3-37-0 ::-webkit-outer-spin-button{height:auto}.gradio-container-3-37-0 [type=search]{-webkit-appearance:textfield;outline-offset:-2px}.gradio-container-3-37-0 ::-webkit-search-decoration{-webkit-appearance:none}.gradio-container-3-37-0 ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.gradio-container-3-37-0 summary{display:list-item}.gradio-container-3-37-0 blockquote,.gradio-container-3-37-0 dl,.gradio-container-3-37-0 dd,.gradio-container-3-37-0 h1,.gradio-container-3-37-0 h2,.gradio-container-3-37-0 h3,.gradio-container-3-37-0 h4,.gradio-container-3-37-0 h5,.gradio-container-3-37-0 h6,.gradio-container-3-37-0 hr,.gradio-container-3-37-0 figure,.gradio-container-3-37-0 p,.gradio-container-3-37-0 pre{margin:0}.gradio-container-3-37-0 fieldset{margin:0;padding:0}.gradio-container-3-37-0 legend{padding:0}.gradio-container-3-37-0 ol,.gradio-container-3-37-0 ul,.gradio-container-3-37-0 menu{margin:0;padding:0}.gradio-container-3-37-0 textarea{resize:vertical}.gradio-container-3-37-0 input::placeholder,.gradio-container-3-37-0 textarea::placeholder{opacity:1;color:--color-var(--color-grey-400)}.gradio-container-3-37-0 button,.gradio-container-3-37-0 [role=button]{cursor:pointer}.gradio-container-3-37-0 :disabled{cursor:default}.gradio-container-3-37-0 img,.gradio-container-3-37-0 svg,.gradio-container-3-37-0 video,.gradio-container-3-37-0 canvas,.gradio-container-3-37-0 audio,.gradio-container-3-37-0 iframe,.gradio-container-3-37-0 embed,.gradio-container-3-37-0 object{display:block;vertical-align:middle}.gradio-container-3-37-0 img,.gradio-container-3-37-0 video{max-width:100%;height:auto}.gradio-container-3-37-0 [hidden]{display:none}.gradio-container-3-37-0 [type=text],.gradio-container-3-37-0 [type=email],.gradio-container-3-37-0 [type=url],.gradio-container-3-37-0 [type=password],.gradio-container-3-37-0 [type=number],.gradio-container-3-37-0 [type=date],.gradio-container-3-37-0 [type=datetime-local],.gradio-container-3-37-0 [type=month],.gradio-container-3-37-0 [type=search],.gradio-container-3-37-0 [type=tel],.gradio-container-3-37-0 [type=time],.gradio-container-3-37-0 [type=week],.gradio-container-3-37-0 [multiple],.gradio-container-3-37-0 textarea,.gradio-container-3-37-0 select{--tw-shadow: 0 0 #0000;appearance:none;border-width:1px;border-color:#6b7280;border-radius:0;background-color:#fff;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem}.gradio-container-3-37-0 [type=checkbox],.gradio-container-3-37-0 [type=radio]{color-adjust:exact;display:inline-block;flex-shrink:0;vertical-align:middle;appearance:none;border-width:1px;border-color:#6b7280;background-origin:border-box;background-color:#fff;padding:0;width:1rem;height:1rem;color:#2563eb;user-select:none}.gradio-container-3-37-0 [type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}.gradio-container-3-37-0 [type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}.gradio-container-3-37-0 select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-size:1.5em 1.5em;background-repeat:no-repeat;padding-right:2.5rem}.gradio-container-3-37-0 [type=checkbox]:checked,.gradio-container-3-37-0 [type=radio]:checked{background-position:center;background-size:100% 100%;background-repeat:no-repeat}.gradio-container-3-37-0 [type=checkbox]:checked:hover,.gradio-container-3-37-0 [type=checkbox]:checked:focus,.gradio-container-3-37-0 [type=radio]:checked:hover,.gradio-container-3-37-0 [type=radio]:checked:focus{border-color:transparent}.gradio-container-3-37-0 [type=checkbox]:focus-visible,.gradio-container-3-37-0 [type=radio]:focus-visible{outline:none}.gradio-container-3-37-0 .scroll-hide{-ms-overflow-style:none;scrollbar-width:none}.gradio-container-3-37-0 .sr-only{clip:rect(0,0,0,0);position:absolute;margin:-1px;border-width:0;padding:0;width:1px;height:1px;overflow:hidden;white-space:nowrap}.gradio-container-3-37-0 .scroll-hide::-webkit-scrollbar{display:none}.gradio-container-3-37-0{-webkit-text-size-adjust:100%;line-height:1.5;font-family:var(--font);-moz-tab-size:4;tab-size:4}.gradio-container-3-37-0 .cropper-container{position:relative;-ms-touch-action:none;touch-action:none;font-size:0;line-height:0;direction:ltr;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.gradio-container-3-37-0 .cropper-container img{display:block;image-orientation:0deg;width:100%;min-width:0!important;max-width:none!important;height:100%;min-height:0!important;max-height:none!important}.gradio-container-3-37-0 .cropper-wrap-box,.gradio-container-3-37-0 .cropper-canvas,.gradio-container-3-37-0 .cropper-drag-box,.gradio-container-3-37-0 .cropper-crop-box,.gradio-container-3-37-0 .cropper-modal{position:absolute;inset:0}.gradio-container-3-37-0 .cropper-wrap-box,.gradio-container-3-37-0 .cropper-canvas{overflow:hidden}.gradio-container-3-37-0 .cropper-drag-box{opacity:0;background-color:#fff}.gradio-container-3-37-0 .cropper-modal{opacity:.5;background-color:#000}.gradio-container-3-37-0 .cropper-view-box{display:block;outline:1px solid #39f;outline-color:#3399ffbf;width:100%;height:100%;overflow:hidden}.gradio-container-3-37-0 .cropper-dashed{display:block;position:absolute;opacity:.5;border:0 dashed #eee}.gradio-container-3-37-0 .cropper-dashed.dashed-h{top:calc(100% / 3);left:0;border-top-width:1px;border-bottom-width:1px;width:100%;height:calc(100% / 3)}.gradio-container-3-37-0 .cropper-dashed.dashed-v{top:0;left:calc(100% / 3);border-right-width:1px;border-left-width:1px;width:calc(100% / 3);height:100%}.gradio-container-3-37-0 .cropper-center{display:block;position:absolute;top:50%;left:50%;opacity:.75;width:0;height:0}.gradio-container-3-37-0 .cropper-center:before,.gradio-container-3-37-0 .cropper-center:after{display:block;position:absolute;background-color:#eee;content:" "}.gradio-container-3-37-0 .cropper-center:before{top:0;left:-3px;width:7px;height:1px}.gradio-container-3-37-0 .cropper-center:after{top:-3px;left:0;width:1px;height:7px}.gradio-container-3-37-0 .cropper-face,.gradio-container-3-37-0 .cropper-line,.gradio-container-3-37-0 .cropper-point{display:block;position:absolute;opacity:.1;width:100%;height:100%}.gradio-container-3-37-0 .cropper-face{top:0;left:0;background-color:#fff}.gradio-container-3-37-0 .cropper-line{background-color:#39f}.gradio-container-3-37-0 .cropper-line.line-e{top:0;right:-3px;cursor:ew-resize;width:5px}.gradio-container-3-37-0 .cropper-line.line-n{top:-3px;left:0;cursor:ns-resize;height:5px}.gradio-container-3-37-0 .cropper-line.line-w{top:0;left:-3px;cursor:ew-resize;width:5px}.gradio-container-3-37-0 .cropper-line.line-s{bottom:-3px;left:0;cursor:ns-resize;height:5px}.gradio-container-3-37-0 .cropper-point{opacity:.75;background-color:#39f;width:5px;height:5px}.gradio-container-3-37-0 .cropper-point.point-e{top:50%;right:-3px;cursor:ew-resize;margin-top:-3px}.gradio-container-3-37-0 .cropper-point.point-n{top:-3px;left:50%;cursor:ns-resize;margin-left:-3px}.gradio-container-3-37-0 .cropper-point.point-w{top:50%;left:-3px;cursor:ew-resize;margin-top:-3px}.gradio-container-3-37-0 .cropper-point.point-s{bottom:-3px;left:50%;cursor:s-resize;margin-left:-3px}.gradio-container-3-37-0 .cropper-point.point-ne{top:-3px;right:-3px;cursor:nesw-resize}.gradio-container-3-37-0 .cropper-point.point-nw{top:-3px;left:-3px;cursor:nwse-resize}.gradio-container-3-37-0 .cropper-point.point-sw{bottom:-3px;left:-3px;cursor:nesw-resize}.gradio-container-3-37-0 .cropper-point.point-se{right:-3px;bottom:-3px;opacity:1;cursor:nwse-resize;width:20px;height:20px}@media (min-width: 768px){.gradio-container-3-37-0 .cropper-point.point-se{width:15px;height:15px}}@media (min-width: 992px){.gradio-container-3-37-0 .cropper-point.point-se{width:10px;height:10px}}@media (min-width: 1200px){.gradio-container-3-37-0 .cropper-point.point-se{opacity:.75;width:5px;height:5px}}.gradio-container-3-37-0 .cropper-point.point-se:before{display:block;position:absolute;right:-50%;bottom:-50%;opacity:0;background-color:#39f;width:200%;height:200%;content:" "}.gradio-container-3-37-0 .cropper-invisible{opacity:0}.gradio-container-3-37-0 .cropper-bg{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC)}.gradio-container-3-37-0 .cropper-hide{display:block;position:absolute;width:0;height:0}.gradio-container-3-37-0 .cropper-hidden{display:none!important}.gradio-container-3-37-0 .cropper-move{cursor:move}.gradio-container-3-37-0 .cropper-crop{cursor:crosshair}.gradio-container-3-37-0 .cropper-disabled .cropper-drag-box,.gradio-container-3-37-0 .cropper-disabled .cropper-face,.gradio-container-3-37-0 .cropper-disabled .cropper-line,.gradio-container-3-37-0 .cropper-disabled .cropper-point{cursor:not-allowed}:root{--scale-0: 1rem;--scale-1: 1.125rem;--scale-2: 1.25rem;--scale-3: 1.5rem;--scale-4: 1.875rem;--scale-5: 2.25rem;--scale-6: 3rem;--scale-7: 3.75rem;--scale-8: 4.5rem;--scale-9: 6rem;--scale-10: 8rem;--scale-000: .75rem;--scale-00: .875rem;--scale-fluid-0: clamp(.875rem, .8rem + .25vw, 1rem);--scale-fluid-1: clamp(1rem, .925rem + .25vw, 1.125rem);--scale-fluid-2: clamp(1.125rem, 1.05rem + .25vw, 1.25rem);--scale-fluid-3: clamp(1.8125rem, 2rem + -.625vw, 1.5rem);--scale-fluid-4: clamp(1.5rem, 1.275rem + .75vw, 1.875rem);--scale-fluid-5: clamp(1.875rem, 1.65rem + .75vw, 2.25rem);--scale-fluid-6: clamp(2.25rem, 1.8rem + 1.5vw, 3rem);--scale-fluid-7: clamp(3rem, 2.55rem + 1.5vw, 3.75rem);--scale-fluid-8: clamp(3.75rem, 3.3rem + 1.5vw, 4.5rem);--scale-fluid-9: clamp(4.5rem, 3.6rem + 3vw, 6rem);--scale-fluid-10: clamp(6rem, 4.8rem + 4vw, 8rem);--scale-fluid-000: clamp(.625rem, .55rem + .25vw, .75rem);--scale-fluid-00: clamp(.75rem, .675rem + .25vw, .875rem);--font-sans: Source Sans Pro, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-serif: Georgia, Cambria, "Times New Roman", Times, serif;--font-mono: IBM Plex Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--weight-light: 300;--weight-regular: 400;--weight-medium: 500;--weight-semibold: 600;--weight-bold: 700;--weight-extrabold: 800;--weight-black: 900;--line-none: 1;--line-xs: 1.125;--line-sm: 1.4;--line-md: 1.5;--line-lg: 1.625;--line-xl: 2;--letter-xs: -.05em;--letter-sm: -.025em;--letter-none: 0em;--letter-lg: .025em;--letter-xl: .05em;--prose-xs: 45ch;--prose-sm: 55ch;--prose-md: 65ch;--prose-lg: 75ch;--prose-xl: 85ch;--size-1: 4px;--size-2: 8px;--size-3: 12px;--size-4: 16px;--size-5: 20px;--size-6: 24px;--size-7: 28px;--size-8: 32px;--size-9: 36px;--size-10: 40px;--size-11: 44px;--size-12: 48px;--size-14: 56px;--size-16: 64px;--size-20: 80px;--size-24: 96px;--size-28: 112px;--size-32: 128px;--size-36: 144px;--size-40: 160px;--size-44: 176px;--size-48: 192px;--size-52: 208px;--size-56: 224px;--size-60: 240px;--size-64: 256px;--size-72: 288px;--size-80: 320px;--size-96: 384px;--size-px: 1px;--size-full: 100%;--size-screen: 100vw;--size-min: min-content;--size-max: max-content;--size-0-5: 2px;--size-1-5: 6px;--size-2-5: 10px;--size-screen-h: 100vh;--width-xs: 480px;--width-sm: 640px;--width-md: 768px;--width-lg: 1024px;--width-xl: 1280px;--ratio-square: 1/1;--ratio-portrait: 3/4;--ratio-landscape: 4/3;--ratio-tall: 2/3;--ratio-wide: 3/2;--ratio-widescreen: 16/9;--ratio-golden: 1.618/1;--radius-100: 100%;--radius-xs: 2px;--radius-sm: 4px;--radius-md: 6px;--radius-lg: 8px;--radius-xl: 12px;--radius-full: 9999px;--radius-2xl: 16px;--radius-3xl: 22px;--blur-xs: blur(4px);--blur-sm: blur(8px);--blur-md: blur(16px);--blur-lg: blur(24px);--blur-xl: blur(40px);--layer-1: 10;--layer-2: 20;--layer-3: 30;--layer-4: 40;--layer-5: 50;--layer-below: -1;--layer-top: 2147483647;--shadow-xs: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px 0 rgba(0, 0, 0, .06);--shadow-sm: 0 4px 6px -2px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .06);--shadow-md: 0 12px 16px -4px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .05);--shadow-lg: 0 20px 24px -4px rgba(0, 0, 0, .1), 0 8px 8px -4px rgba(0, 0, 0, .04);--shadow-xl: 0 24px 48px -12px rgba(0, 0, 0, .25);--ease-in-sine: cubic-bezier(.47, 0, .745, .715);--ease-out-sine: cubic-bezier(.39, .575, .565, 1);--ease-in-out-sine: cubic-bezier(.445, .05, .55, .95);--ease-in-quad: cubic-bezier(.55, .085, .68, .53);--ease-out-quad: cubic-bezier(.25, .46, .45, .94);--ease-in-out-quad: cubic-bezier(.455, .03, .515, .955);--ease-in-cubic: cubic-bezier(.55, .055, .675, .19);--ease-out-cubic: cubic-bezier(.215, .61, .355, 1);--ease-in-out-cubic: cubic-bezier(.645, .045, .355, 1);--ease-in-quart: cubic-bezier(.895, .03, .685, .22);--ease-out-quart: cubic-bezier(.165, .84, .44, 1);--ease-in-out-quart: cubic-bezier(.77, 0, .175, 1);--ease-in-quint: cubic-bezier(.755, .05, .855, .06);--ease-out-quint: cubic-bezier(.23, 1, .32, 1);--ease-in-out-quint: cubic-bezier(.86, 0, .07, 1);--ease-in-expo: cubic-bezier(.95, .05, .795, .035);--ease-out-expo: cubic-bezier(.19, 1, .22, 1);--ease-in-out-expo: cubic-bezier(1, 0, 0, 1);--ease-in-circ: cubic-bezier(.6, .04, .98, .335);--ease-out-circ: cubic-bezier(.075, .82, .165, 1);--ease-in-out-circ: cubic-bezier(.785, .135, .15, .86);--ease-in-back: cubic-bezier(.6, -.28, .735, .045);--ease-out-back: cubic-bezier(.175, .885, .32, 1.275);--ease-in-out-back: cubic-bezier(.68, -.55, .265, 1.55);--easing-standard: cubic-bezier(.4, 0, .2, 1);--easing-accelerate: cubic-bezier(.4, 0, 1, 1);--easing-decelerate: cubic-bezier(0, 0, .2, 1);--elevation-1: 0 1px 2px 0 rgba(0, 0, 0, .05);--elevation-2: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px 0 rgba(0, 0, 0, .06);--elevation-3: 0 4px 6px -2px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .06);--elevation-4: 0 12px 16px -4px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .05);--elevation-5: 0 20px 24px -4px rgba(0, 0, 0, .1), 0 8px 8px -4px rgba(0, 0, 0, .04);--elevation-6: 0 24px 48px -12px rgba(0, 0, 0, .25);--elevation-7: 0 32px 64px -12px rgba(0, 0, 0, .2);--color-grey-50: #f9fafb;--color-grey-100: #f3f4f6;--color-grey-200: #e5e7eb;--color-grey-300: #d1d5db;--color-grey-400: #9ca3af;--color-grey-500: #6b7280;--color-grey-600: #4b5563;--color-grey-700: #374151;--color-grey-800: #1f2937;--color-grey-900: #111827;--color-black: #14141b;--color-grey: #6b7280;--color-red-300: #fca5a5;--color-red-500: #ef4444;--color-red-700: #b91c1c;--color-red: #ef4444;--color-green-300: #86efac;--color-green-500: #22c55e;--color-green-700: #15803d;--color-green: #22c55e;--color-blue-300: #93c5fd;--color-blue-500: #0ea5e9;--color-blue-700: #1d4ed8;--color-blue: #0ea5e9;--color-pink-300: #fbb6ce;--color-pink-500: #ed64a6;--color-pink-700: #d53f8c;--color-pink: var(--color-pink-500);--color-purple-300: #b794f4;--color-purple-500: #805ad5;--color-purple-700: #6b46c1;--color-purple: var(--color-purple-500);--color-teal-300: #81e6d9;--color-teal-500: #38b2ac;--color-teal-700: #2c7a7b;--color-teal: var(--color-teal-500);--color-yellow-300: #fde047;--color-yellow-500: #eab308;--color-yellow-700: #a16207;--color-yellow: #eab308;--color-orange-300: #ffb066;--color-orange-500: #ff7c00;--color-orange-700: #ce6400;--color-orange: #f97316;--color-brown-300: #a1887f;--color-brown-500: #795548;--color-brown-700: #5d4037;--color-brown: var(--color-brown-500);--color-blue-10: #fafcff;--color-blue-50: #eff6ff;--color-blue-100: #dbeafe;--color-blue-200: #bfdbfe;--color-blue-400: #60a5fa;--color-blue-600: #2563eb;--color-blue-800: #1e40af;--color-blue-900: #1e3a8a;--color-blue-950: #1c366b;--color-grey-10: #fdfdfe;--color-grey-950: #0b0f19;--color-red-10: #fffbfb;--color-red-50: #fef2f2;--color-red-100: #fee2e2;--color-red-200: #fecaca;--color-red-400: #f87171;--color-red-600: #dc2626;--color-red-800: #991b1b;--color-red-900: #7f1d1d;--color-red-950: #63171a;--color-green-10: #f9fefc;--color-green-50: #ecfdf5;--color-green-100: #d1fae5;--color-green-200: #bbf7d0;--color-green-400: #4ade80;--color-green-600: #16a34a;--color-green-800: #166534;--color-green-900: #14532d;--color-green-950: #134227;--color-orange-10: #fffbf6;--color-orange-50: #fff2e5;--color-orange-100: #ffe5cc;--color-orange-200: #ffd8b4;--color-orange-400: #ff9633;--color-orange-600: #ee7400;--color-orange-800: #a45000;--color-orange-900: #5c2d00;--color-orange-950: #3c1f00;--color-yellow-10: #fffef8;--color-yellow-50: #fffbeb;--color-yellow-100: #fff9c2;--color-yellow-200: #fef08a;--color-yellow-400: #facc15;--color-yellow-600: #ca8a04;--color-yellow-800: #854d0e;--color-yellow-900: #713f12;--color-yellow-950: #633112;--grid-2: repeat(2, minmax(0, 1fr));--grid-3: repeat(3, minmax(0, 1fr));--grid-4: repeat(4, minmax(0, 1fr));--grid-5: repeat(5, minmax(0, 1fr));--grid-6: repeat(6, minmax(0, 1fr));--grid-7: repeat(7, minmax(0, 1fr));--grid-8: repeat(8, minmax(0, 1fr));--grid-9: repeat(9, minmax(0, 1fr));--grid-10: repeat(10, minmax(0, 1fr));--grid-11: repeat(11, minmax(0, 1fr));--grid-12: repeat(12, minmax(0, 1fr));--grid-page-width: var(--width-xl);--grid-page-gutter: 5vw;--grid-page-main: 2 / 3;--grid-page: minmax(var(--grid-page-gutter), 1fr) minmax(0, var(--grid-page-width)) minmax(var(--grid-page-gutter), 1fr)}.gradio-container-3-37-0 .prose{font-weight:var(--prose-text-weight);font-size:var(--text-md)}.gradio-container-3-37-0 .prose *{color:var(--body-text-color)}.gradio-container-3-37-0 .prose p{margin-bottom:var(--spacing-sm);line-height:var(--line-lg)}.gradio-container-3-37-0 .prose h1,.gradio-container-3-37-0 .prose h2,.gradio-container-3-37-0 .prose h3,.gradio-container-3-37-0 .prose h4,.gradio-container-3-37-0 .prose h5{margin:var(--spacing-xxl) 0 var(--spacing-lg);font-weight:var(--prose-header-text-weight);line-height:1.3}.gradio-container-3-37-0 .prose>*:first-child{margin-top:0}.gradio-container-3-37-0 .prose h1{margin-top:0;font-size:var(--text-xxl)}.gradio-container-3-37-0 .prose h2{font-size:var(--text-xl)}.gradio-container-3-37-0 .prose h3{font-size:var(--text-lg)}.gradio-container-3-37-0 .prose h4{font-size:1.1em}.gradio-container-3-37-0 .prose h5{font-size:1.05em}.gradio-container-3-37-0 .prose ul{list-style:circle inside}.gradio-container-3-37-0 .prose ol{list-style:decimal inside}.gradio-container-3-37-0 .prose ul>p,.gradio-container-3-37-0 .prose li>p{display:inline-block}.gradio-container-3-37-0 .prose ol,.gradio-container-3-37-0 .prose ul{margin-top:0;padding-left:0}.gradio-container-3-37-0 .prose ul ul,.gradio-container-3-37-0 .prose ul ol,.gradio-container-3-37-0 .prose ol ol,.gradio-container-3-37-0 .prose ol ul{margin:.5em 0 .5em 3em;font-size:90%}.gradio-container-3-37-0 .prose li{margin-bottom:.5em}.gradio-container-3-37-0 .prose code{border:1px solid var(--border-color-primary);border-radius:var(--radius-sm);background:var(--background-fill-secondary);padding:1px 3px;font-size:85%;white-space:nowrap}.gradio-container-3-37-0 .prose pre>code{display:block;padding:.5em .7em;white-space:pre}.gradio-container-3-37-0 .prose th,.gradio-container-3-37-0 .prose td{border-bottom:1px solid #e1e1e1;padding:12px 15px;text-align:left}.gradio-container-3-37-0 .prose th:first-child,.gradio-container-3-37-0 .prose td:first-child{padding-left:0}.gradio-container-3-37-0 .prose th:last-child,.gradio-container-3-37-0 .prose td:last-child{padding-right:0}.gradio-container-3-37-0 .prose button,.gradio-container-3-37-0 .prose .button,.gradio-container-3-37-0 .prose input,.gradio-container-3-37-0 .prose textarea,.gradio-container-3-37-0 .prose select,.gradio-container-3-37-0 .prose fieldset{margin-bottom:var(--spacing-sm)}.gradio-container-3-37-0 .prose pre,.gradio-container-3-37-0 .prose blockquote,.gradio-container-3-37-0 .prose dl,.gradio-container-3-37-0 .prose figure,.gradio-container-3-37-0 .prose table,.gradio-container-3-37-0 .prose p,.gradio-container-3-37-0 .prose ul,.gradio-container-3-37-0 .prose ol,.gradio-container-3-37-0 .prose form{margin-bottom:var(--spacing-md)}.gradio-container-3-37-0 .prose a{color:var(--link-text-color);text-decoration:underline}.gradio-container-3-37-0 .prose a:visited{color:var(--link-text-color-visited)}.gradio-container-3-37-0 .prose a:hover{color:var(--link-text-color-hover)}.gradio-container-3-37-0 .prose a:active{color:var(--link-text-color-active)}.gradio-container-3-37-0 .prose hr{margin-top:3em;margin-bottom:3.5em;border-width:0;border-top:1px solid #e1e1e1}.gradio-container-3-37-0 .prose blockquote{margin:var(--size-6) 0!important;border-left:5px solid var(--border-color-primary);padding-left:var(--size-2)}.gradio-container-3-37-0 .prose :last-child{margin-bottom:0!important}.gradio-container-3-37-0{display:flex;position:relative;flex-direction:column;padding:0;min-height:1px;overflow:hidden;color:var(--button-secondary-text-color)}.embed-container.svelte-1kyws56.svelte-1kyws56{margin:var(--size-4) 0px;border:1px solid var(--button-secondary-border-color);border-radius:var(--embed-radius)}.with-info.svelte-1kyws56.svelte-1kyws56{padding-bottom:var(--size-7)}.embed-container.svelte-1kyws56>.main.svelte-1kyws56{padding:var(--size-4)}.app.svelte-1kyws56>.main.svelte-1kyws56{display:flex;flex-grow:1;flex-direction:column}.app.svelte-1kyws56.svelte-1kyws56{position:relative;margin:auto;padding:var(--size-4);width:100%;height:100%}@media (min-width: 640px){.app.svelte-1kyws56.svelte-1kyws56{max-width:640px}}@media (min-width: 768px){.app.svelte-1kyws56.svelte-1kyws56{max-width:768px}}@media (min-width: 1024px){.app.svelte-1kyws56.svelte-1kyws56{max-width:1024px}}@media (min-width: 1280px){.app.svelte-1kyws56.svelte-1kyws56{max-width:1280px}}@media (min-width: 1536px){.app.svelte-1kyws56.svelte-1kyws56{max-width:1536px}}.info.svelte-1kyws56.svelte-1kyws56{display:flex;position:absolute;bottom:0;justify-content:flex-start;border-top:1px solid var(--button-secondary-border-color);padding:var(--size-1) var(--size-5);width:100%;color:var(--body-text-color-subdued);font-size:var(--text-md);white-space:nowrap}.info.svelte-1kyws56>span.svelte-1kyws56{word-wrap:break-word;-break:keep-all;display:block;word-break:keep-all}.info.svelte-1kyws56>span.svelte-1kyws56:nth-child(1){margin-right:4px;min-width:0px;max-width:max-content;overflow:hidden;color:var(--body-text-color);text-overflow:ellipsis;white-space:nowrap}.info.svelte-1kyws56>span.svelte-1kyws56:nth-child(2){margin-right:3px}.info.svelte-1kyws56>span.svelte-1kyws56:nth-child(2),.info.svelte-1kyws56>span.svelte-1kyws56:nth-child(3){width:max-content}.info.svelte-1kyws56>span.svelte-1kyws56:nth-child(3){align-self:flex-end;justify-self:flex-end;margin-left:auto;text-align:right}.info.svelte-1kyws56>span.svelte-1kyws56:nth-child(1){flex-shrink:9}.hidden-title.svelte-1kyws56.svelte-1kyws56{position:absolute;left:var(--size-5);opacity:0;background:var(--button-secondary-background-fill);padding-right:4px}.info.svelte-1kyws56 a.svelte-1kyws56{color:var(--body-text-color)}.title.svelte-1kyws56.svelte-1kyws56{font-size:var(--text-sm);font-family:var(--font-mono)}.hf.svelte-1kyws56.svelte-1kyws56{margin-left:5px}.space-logo.svelte-1kyws56 img.svelte-1kyws56{display:inline-block;margin-bottom:4px;height:12px}a.svelte-1kyws56.svelte-1kyws56:hover{text-decoration:underline}svg.svelte-zyxd38.svelte-zyxd38{width:var(--size-20);height:var(--size-20)}svg.svelte-zyxd38 path.svelte-zyxd38{fill:var(--loader-color)}div.svelte-zyxd38.svelte-zyxd38{z-index:var(--layer-2)}.margin.svelte-zyxd38.svelte-zyxd38{margin:var(--size-4)}.wrap.svelte-zlszon.svelte-zlszon{display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:var(--layer-5);transition:opacity .1s ease-in-out;border-radius:var(--block-radius);background:var(--block-background-fill);padding:0 var(--size-6);max-height:var(--size-screen-h);overflow:hidden;pointer-events:none}.wrap.center.svelte-zlszon.svelte-zlszon{top:0;right:0;left:0}.wrap.default.svelte-zlszon.svelte-zlszon{inset:0}.hide.svelte-zlszon.svelte-zlszon{opacity:0;pointer-events:none}.generating.svelte-zlszon.svelte-zlszon{animation:svelte-zlszon-pulse 2s cubic-bezier(.4,0,.6,1) infinite;border:2px solid var(--color-accent);background:transparent}.translucent.svelte-zlszon.svelte-zlszon{background:none}@keyframes svelte-zlszon-pulse{0%,to{opacity:1}50%{opacity:.5}}.loading.svelte-zlszon.svelte-zlszon{z-index:var(--layer-2);color:var(--body-text-color)}.eta-bar.svelte-zlszon.svelte-zlszon{position:absolute;inset:0;transform-origin:left;opacity:.8;z-index:var(--layer-1);transition:10ms;background:var(--background-fill-secondary)}.progress-bar-wrap.svelte-zlszon.svelte-zlszon{border:1px solid var(--border-color-primary);background:var(--background-fill-primary);width:55.5%;height:var(--size-4)}.progress-bar.svelte-zlszon.svelte-zlszon{transform-origin:left;background-color:var(--loader-color);width:var(--size-full);height:var(--size-full)}.progress-level.svelte-zlszon.svelte-zlszon{display:flex;flex-direction:column;align-items:center;gap:1;z-index:var(--layer-2);width:var(--size-full)}.progress-level-inner.svelte-zlszon.svelte-zlszon{margin:var(--size-2) auto;color:var(--body-text-color);font-size:var(--text-sm);font-family:var(--font-mono)}.meta-text.svelte-zlszon.svelte-zlszon{position:absolute;top:0;right:0;z-index:var(--layer-2);padding:var(--size-1) var(--size-2);font-size:var(--text-sm);font-family:var(--font-mono)}.meta-text-center.svelte-zlszon.svelte-zlszon{display:flex;position:absolute;top:0;right:0;justify-content:center;align-items:center;transform:translateY(var(--size-6));z-index:var(--layer-2);padding:var(--size-1) var(--size-2);font-size:var(--text-sm);font-family:var(--font-mono);text-align:center}.error.svelte-zlszon.svelte-zlszon{box-shadow:var(--shadow-drop);border:solid 1px var(--error-border-color);border-radius:var(--radius-full);background:var(--error-background-fill);padding-right:var(--size-4);padding-left:var(--size-4);color:var(--error-text-color);font-weight:var(--weight-semibold);font-size:var(--text-lg);line-height:var(--line-lg);font-family:var(--font)}.minimal.svelte-zlszon .progress-text.svelte-zlszon{background:var(--block-background-fill)}.error.svelte-y6l4b.svelte-y6l4b{position:relative;padding:var(--size-4);color:var(--body-text-color);text-align:center}.error.svelte-y6l4b>.svelte-y6l4b{margin-top:var(--size-4)}a.svelte-y6l4b.svelte-y6l4b{color:var(--link-text-color)}a.svelte-y6l4b.svelte-y6l4b:hover{color:var(--link-text-color-hover);text-decoration:underline}a.svelte-y6l4b.svelte-y6l4b:visited{color:var(--link-text-color-visited)}a.svelte-y6l4b.svelte-y6l4b:active{color:var(--link-text-color-active)}
diff --git a/spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/httpcore/_exceptions.py b/spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/httpcore/_exceptions.py
deleted file mode 100644
index 81e7fc61ddfe258296d4d08b436fa8627f335dc9..0000000000000000000000000000000000000000
--- a/spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/httpcore/_exceptions.py
+++ /dev/null
@@ -1,81 +0,0 @@
-import contextlib
-from typing import Iterator, Mapping, Type
-
-ExceptionMapping = Mapping[Type[Exception], Type[Exception]]
-
-
-@contextlib.contextmanager
-def map_exceptions(map: ExceptionMapping) -> Iterator[None]:
- try:
- yield
- except Exception as exc: # noqa: PIE786
- for from_exc, to_exc in map.items():
- if isinstance(exc, from_exc):
- raise to_exc(exc) from exc
- raise # pragma: nocover
-
-
-class ConnectionNotAvailable(Exception):
- pass
-
-
-class ProxyError(Exception):
- pass
-
-
-class UnsupportedProtocol(Exception):
- pass
-
-
-class ProtocolError(Exception):
- pass
-
-
-class RemoteProtocolError(ProtocolError):
- pass
-
-
-class LocalProtocolError(ProtocolError):
- pass
-
-
-# Timeout errors
-
-
-class TimeoutException(Exception):
- pass
-
-
-class PoolTimeout(TimeoutException):
- pass
-
-
-class ConnectTimeout(TimeoutException):
- pass
-
-
-class ReadTimeout(TimeoutException):
- pass
-
-
-class WriteTimeout(TimeoutException):
- pass
-
-
-# Network errors
-
-
-class NetworkError(Exception):
- pass
-
-
-class ConnectError(NetworkError):
- pass
-
-
-class ReadError(NetworkError):
- pass
-
-
-class WriteError(NetworkError):
- pass
diff --git a/spaces/DaleChen/AutoGPT/benchmark/__init__.py b/spaces/DaleChen/AutoGPT/benchmark/__init__.py
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/spaces/Danil/AnyNameHack/utils.py b/spaces/Danil/AnyNameHack/utils.py
deleted file mode 100644
index 23183b3775ea60d65f4d0aecb5b1ec663a4f2af6..0000000000000000000000000000000000000000
--- a/spaces/Danil/AnyNameHack/utils.py
+++ /dev/null
@@ -1,114 +0,0 @@
-import pymorphy2
-
-morph = pymorphy2.MorphAnalyzer()
-STOP_PUNCT = list(',./!@#$%^&*()_+=-<>?\|{}[]`~/')
-STOP = set(
- ["скидка", "скидкой", "скидки", "скидке", "скидкой", "скидке", "недорого", "дешево",
- "в", "на", "для", "о", "у", "и", "с", "из"] + STOP_PUNCT
- )
-
-def counter(s: str) -> dict:
- """
- Словарь, который позволяет нам считать количество неизменяемых объектов
-
- Args:
- s: Входная строка, по которой строится словарь
- Returns:
- Количество неизменяемых объектов
- """
- d = {}
- for i in s:
- if i not in d:
- d[i] = 0
- d[i] += 1
- return d
-
-def prepare4check(s1: str, s2: str, STOP: set = STOP, morph=morph) -> list:
- """
- Предобработка данных для проверки
-
- Args:
- s1: Первая сравнимая строка
- s2: Вторая сравнимая строка
- STOP: множество стоп слов, которые мы хотели бы исключать
- morph: Морфологический анализатор, для лемматизации слов
- Returns:
- Список предобработанных данных:
- set_s1: уникальные слова первой строки с учетом удаленных стоп слов
- set_s2: уникальные слова второй строки с учетом удаленных стоп слов
- diff_s1: Разница между множеством слов 1 строки и множеством слов 2 строки
- diff_s2: Разница между множеством слов 2 строки и множеством слов 1 строки
- """
- s1 = s1.lower()
- s2 = s2.lower()
- s1 = [morph.parse(i)[0].normal_form for i in s1.split(' ')]
- s2 = [morph.parse(i)[0].normal_form for i in s2.split(' ')]
- set_s1 = set(s1) - STOP
- set_s2 = set(s2) - STOP
-
- diff_s1 = ' '.join(list(set_s1 - set_s2))
- diff_s2 = ' '.join(list(set_s2 - set_s1))
-
- return [set_s1, set_s2, diff_s1, diff_s2]
-
-def easy_check(s1: str, s2: str, STOP: set = STOP) -> bool:
- """
- Простой уровень проверки. Есть 3 типа проверки:
- 1: если s1 имеет такие же слова, как и s2
- 2: если s1 входит в множество слов s2 (предполагаем, что s2 хранит дополнительные признаки, например s1=обувь, а s2=обувь Адидас)
- 3: если s2 входит в множество слов s1 (предполагаем, что s2 не хранит никакой дополнительной информацией, а является частью s1)
- Args:
- s1: Первая сравнимая строка
- s2: Вторая сравнимая строка
- STOP: множество стоп слов, которые мы хотели бы исключать
- Returns:
- результат всех условий первой проверки
- """
- set_s1, set_s2, diff_s1, diff_s2 = prepare4check(s1, s2, STOP)
- if set_s1 == set_s2:
- return False
- if len(diff_s1) == 0:
- return True
- if len(diff_s2) == 0:
- return False
- return True
-
-def check(s1: str, s2: str, STOP: set = STOP, morph=morph) -> bool:
- """
- Более сложный уровень проверки. Есть 4 типа проверки:
- 1: если s1 имеет такие же слова, как и s2
- 2: если s1 входит в множество слов s2 (предполагаем, что s2 хранит дополнительные признаки, например s1=обувь, а s2=обувь Адидас)
- 3: если s2 входит в множество слов s1 (предполагаем, что s2 не хранит никакой дополнительной информацией, а является частью s1)
- 4: проверяем частотность минимальной строки, к максимальной, чтобы определить разницу между количеством уникальных токенов
- Args:
- s1: Первая сравнимая строка
- s2: Вторая сравнимая строка
- STOP: множество стоп слов, которые мы хотели бы исключать
- morph: Морфологический анализатор, для лемматизации слов
- Returns:
- результат всех условий второй проверки
- """
- set_s1, set_s2, diff_s1, diff_s2 = prepare4check(s1, s2, STOP)
- if set_s1 == set_s2:
- return False
-
- if len(diff_s1) == 0:
- return True
- if len(diff_s2) == 0:
- return False
-
- dt = {len(diff_s1): diff_s1, len(diff_s2): diff_s2}
-
- c = 0
- max_s, min_s = dt[max(len(diff_s1), len(diff_s2))], dt[min(len(diff_s1), len(diff_s2))]
- c_s1 = counter(min_s)
- c_s2 = counter(max_s)
- for i in min_s:
- if i in c_s2 and c_s2[i] > 0:
- c += 1
- c_s2[i] -= 1
- else:
- c -= 1
- if (c / len(min_s)) < 1.0:
- return True
- return False
\ No newline at end of file
diff --git a/spaces/Datasculptor/MusicGen/audiocraft/quantization/base.py b/spaces/Datasculptor/MusicGen/audiocraft/quantization/base.py
deleted file mode 100644
index 1b16c130d266fbd021d3fc29bb9f98c33dd3c588..0000000000000000000000000000000000000000
--- a/spaces/Datasculptor/MusicGen/audiocraft/quantization/base.py
+++ /dev/null
@@ -1,107 +0,0 @@
-# Copyright (c) Meta Platforms, Inc. and affiliates.
-# All rights reserved.
-#
-# This source code is licensed under the license found in the
-# LICENSE file in the root directory of this source tree.
-
-"""
-Base class for all quantizers.
-"""
-
-from dataclasses import dataclass, field
-import typing as tp
-
-import torch
-from torch import nn
-
-
-@dataclass
-class QuantizedResult:
- x: torch.Tensor
- codes: torch.Tensor
- bandwidth: torch.Tensor # bandwidth in kb/s used, per batch item.
- penalty: tp.Optional[torch.Tensor] = None
- metrics: dict = field(default_factory=dict)
-
-
-class BaseQuantizer(nn.Module):
- """Base class for quantizers.
- """
-
- def forward(self, x: torch.Tensor, frame_rate: int) -> QuantizedResult:
- """
- Given input tensor x, returns first the quantized (or approximately quantized)
- representation along with quantized codes, bandwidth, and any penalty term for the loss.
- Finally, this returns a dict of metrics to update logging etc.
- Frame rate must be passed so that the bandwidth is properly computed.
- """
- raise NotImplementedError()
-
- def encode(self, x: torch.Tensor) -> torch.Tensor:
- """Encode a given input tensor with the specified sample rate at the given bandwidth.
- """
- raise NotImplementedError()
-
- def decode(self, codes: torch.Tensor) -> torch.Tensor:
- """Decode the given codes to the quantized representation.
- """
- raise NotImplementedError()
-
- @property
- def total_codebooks(self):
- """Total number of codebooks.
- """
- raise NotImplementedError()
-
- @property
- def num_codebooks(self):
- """Number of active codebooks.
- """
- raise NotImplementedError()
-
- def set_num_codebooks(self, n: int):
- """Set the number of active codebooks.
- """
- raise NotImplementedError()
-
-
-class DummyQuantizer(BaseQuantizer):
- """Fake quantizer that actually does not perform any quantization.
- """
- def __init__(self):
- super().__init__()
-
- def forward(self, x: torch.Tensor, frame_rate: int):
- q = x.unsqueeze(1)
- return QuantizedResult(x, q, torch.tensor(q.numel() * 32 * frame_rate / 1000 / len(x)).to(x))
-
- def encode(self, x: torch.Tensor) -> torch.Tensor:
- """Encode a given input tensor with the specified sample rate at the given bandwidth.
- In the case of the DummyQuantizer, the codes are actually identical
- to the input and resulting quantized representation as no quantization is done.
- """
- return x.unsqueeze(1)
-
- def decode(self, codes: torch.Tensor) -> torch.Tensor:
- """Decode the given codes to the quantized representation.
- In the case of the DummyQuantizer, the codes are actually identical
- to the input and resulting quantized representation as no quantization is done.
- """
- return codes.squeeze(1)
-
- @property
- def total_codebooks(self):
- """Total number of codebooks.
- """
- return 1
-
- @property
- def num_codebooks(self):
- """Total number of codebooks.
- """
- return self.total_codebooks
-
- def set_num_codebooks(self, n: int):
- """Set the number of active codebooks.
- """
- raise AttributeError("Cannot override the number of codebooks for the dummy quantizer")
diff --git a/spaces/DragGan/DragGan-Inversion/PTI/models/StyleCLIP/mapper/datasets/__init__.py b/spaces/DragGan/DragGan-Inversion/PTI/models/StyleCLIP/mapper/datasets/__init__.py
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/spaces/Dragneel/Recon/sentiment.py b/spaces/Dragneel/Recon/sentiment.py
deleted file mode 100644
index 01d71b99bf34135eb4885cd4b3033466b839156f..0000000000000000000000000000000000000000
--- a/spaces/Dragneel/Recon/sentiment.py
+++ /dev/null
@@ -1,184 +0,0 @@
-import pickle
-import os
-import praw
-import torch
-from transformers import RobertaTokenizer, RobertaForSequenceClassification
-import nltk
-from nltk.stem.porter import PorterStemmer
-from nltk.corpus import stopwords
-import spacy
-import string
-import matplotlib.pyplot as plt
-from wordcloud import WordCloud
-import re
-
-
-def save_data(data, filename):
- with open(filename, 'wb') as file:
- pickle.dump(data, file)
-
-
-def load_data(filename):
- if os.path.exists(filename):
- with open(filename, 'rb') as file:
- return pickle.load(file)
- else:
- return None
-
-
-# PRAW configs
-REDDIT_CLIENT_ID = os.environ['client_id']
-REDDIT_CLIENT_SECRET = os.environ['secret_key']
-REDDIT_USERNAME = os.environ['username']
-
-
-reddit = praw.Reddit(
- client_id=REDDIT_CLIENT_ID,
- client_secret=REDDIT_CLIENT_SECRET,
- user_agent=f"script:sentiment-analysis:v0.0.1 (by {REDDIT_USERNAME})"
-)
-
-# NLP configs
-stemmer = PorterStemmer()
-nlp = spacy.load("en_core_web_sm")
-nltk.download('punkt')
-nltk.download('stopwords')
-
-
-# Model configs
-tokenizer = RobertaTokenizer.from_pretrained('aychang/roberta-base-imdb')
-model = RobertaForSequenceClassification.from_pretrained(
- 'aychang/roberta-base-imdb', num_labels=2)
-model.classifier = torch.nn.Linear(768, 2)
-
-
-def get_sentiment(query):
-
- filename = f"data/sentiment_analysis/{query}_results.pkl"
- saved_data = load_data(filename)
-
- if saved_data:
-
- positive, negative, _ = saved_data
- wordcloud = f'static/images/wordcloud/{query}_cloud.png'
- return positive, negative, wordcloud
- else:
-
- results = get_reddit_results(query)
- if not results:
-
- error = "No results found for query"
- return error
-
- positive, negative, wordcloud = analyze_comments(
- results, query=query)
- print(f'positive:{positive}')
- save_data((positive, negative, wordcloud), filename)
- return positive, negative, f'static/images/wordcloud/{query}_cloud.png'
-
-
-def get_reddit_results(query):
-
- try:
- sub = reddit.subreddit('noveltranslations+progressionfantasy')
- results = sub.search(query, limit=1)
-
-
- results_list = list(results)
-
- if results_list:
-
- return results_list
- else:
- print("No results found for query.")
- return []
- except Exception as e:
- print(f"Error occurred: {e}")
- return []
-
-
-
-def transform_text(text):
- url_pattern = re.compile(r'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+')
- text = url_pattern.sub('', text)
-
- text = text.lower()
- text = nltk.word_tokenize(text)
-
- text = [i for i in text if i.isalnum()]
-
- stopwords_set = set(stopwords.words('english'))
- text = [i for i in text if i not in stopwords_set and i not in string.punctuation]
-
-
- text = [stemmer.stem(i) for i in text]
-
- return ' '.join(text)
-
-
-def tokenize(text):
-
- doc = nlp(text)
- return [token.text for token in doc]
-
-
-def analyze_comments(results, query):
- total_positive = 0
- total_negative = 0
- total_comments = 0
- comments_for_cloud = []
-
- for submission in results:
-
- submission.comments.replace_more(limit=None)
- all_comments = submission.comments.list()
-
- for comment in all_comments:
-
- comment_body = comment.body
-
- text = transform_text(comment_body)
-
- comments_for_cloud.append(comment_body)
-
- if text:
-
- tokens = tokenize(text)
-
- tokenized_input = tokenizer(
- tokens, return_tensors='pt', truncation=True, padding=True)
-
- outputs = model(**tokenized_input)
-
- probabilities = torch.softmax(outputs.logits, dim=-1)
- mean_probabilities = probabilities.mean(dim=1)
-
- positive_pct = mean_probabilities[0][1].item() * 100
- negative_pct = mean_probabilities[0][0].item() * 100
-
- total_positive += positive_pct
- total_negative += negative_pct
- total_comments += 1
-
- if total_comments > 0:
- avg_positive = total_positive / total_comments
- avg_negative = total_negative / total_comments
- else:
- avg_positive = 0
- avg_negative = 0
-
- if total_comments > 0:
- all_comments_string = ' '.join(comments_for_cloud)
-
- wordcloud = WordCloud(width=400, height=400,
- background_color='white',
- max_words=30,
- stopwords=stopwords.words('english'),
- min_font_size=10).generate(all_comments_string)
- # Save the WordCloud image as a static file
- wordcloud.to_file(
- f'static/images/wordcloud/{query}_cloud.png')
- else:
- wordcloud = None
- print(f'positive:{avg_positive}')
- return round(avg_positive), round(avg_negative), wordcloud
diff --git a/spaces/ECCV2022/bytetrack/yolox/data/datasets/__init__.py b/spaces/ECCV2022/bytetrack/yolox/data/datasets/__init__.py
deleted file mode 100644
index 61065a88874f8da6a92542801114ca9a5afe8eac..0000000000000000000000000000000000000000
--- a/spaces/ECCV2022/bytetrack/yolox/data/datasets/__init__.py
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env python3
-# -*- coding:utf-8 -*-
-# Copyright (c) Megvii, Inc. and its affiliates.
-
-from .datasets_wrapper import ConcatDataset, Dataset, MixConcatDataset
-from .mosaicdetection import MosaicDetection
-from .mot import MOTDataset
diff --git a/spaces/EXPOSUREEE/Ai-Image-Enhancer/inference_realesrgan_video.py b/spaces/EXPOSUREEE/Ai-Image-Enhancer/inference_realesrgan_video.py
deleted file mode 100644
index 639b848e6578a2480ee0784e664c7751e325c477..0000000000000000000000000000000000000000
--- a/spaces/EXPOSUREEE/Ai-Image-Enhancer/inference_realesrgan_video.py
+++ /dev/null
@@ -1,199 +0,0 @@
-import argparse
-import glob
-import mimetypes
-import os
-import queue
-import shutil
-import torch
-from basicsr.archs.rrdbnet_arch import RRDBNet
-from basicsr.utils.logger import AvgTimer
-from tqdm import tqdm
-
-from realesrgan import IOConsumer, PrefetchReader, RealESRGANer
-from realesrgan.archs.srvgg_arch import SRVGGNetCompact
-
-
-def main():
- """Inference demo for Real-ESRGAN.
- It mainly for restoring anime videos.
-
- """
- parser = argparse.ArgumentParser()
- parser.add_argument('-i', '--input', type=str, default='inputs', help='Input image or folder')
- parser.add_argument(
- '-n',
- '--model_name',
- type=str,
- default='RealESRGAN_x4plus',
- help=('Model names: RealESRGAN_x4plus | RealESRNet_x4plus | RealESRGAN_x4plus_anime_6B | RealESRGAN_x2plus'
- 'RealESRGANv2-anime-xsx2 | RealESRGANv2-animevideo-xsx2-nousm | RealESRGANv2-animevideo-xsx2'
- 'RealESRGANv2-anime-xsx4 | RealESRGANv2-animevideo-xsx4-nousm | RealESRGANv2-animevideo-xsx4'))
- parser.add_argument('-o', '--output', type=str, default='results', help='Output folder')
- parser.add_argument('-s', '--outscale', type=float, default=4, help='The final upsampling scale of the image')
- parser.add_argument('--suffix', type=str, default='out', help='Suffix of the restored video')
- parser.add_argument('-t', '--tile', type=int, default=0, help='Tile size, 0 for no tile during testing')
- parser.add_argument('--tile_pad', type=int, default=10, help='Tile padding')
- parser.add_argument('--pre_pad', type=int, default=0, help='Pre padding size at each border')
- parser.add_argument('--face_enhance', action='store_true', help='Use GFPGAN to enhance face')
- parser.add_argument('--half', action='store_true', help='Use half precision during inference')
- parser.add_argument('-v', '--video', action='store_true', help='Output a video using ffmpeg')
- parser.add_argument('-a', '--audio', action='store_true', help='Keep audio')
- parser.add_argument('--fps', type=float, default=None, help='FPS of the output video')
- parser.add_argument('--consumer', type=int, default=4, help='Number of IO consumers')
-
- parser.add_argument(
- '--alpha_upsampler',
- type=str,
- default='realesrgan',
- help='The upsampler for the alpha channels. Options: realesrgan | bicubic')
- parser.add_argument(
- '--ext',
- type=str,
- default='auto',
- help='Image extension. Options: auto | jpg | png, auto means using the same extension as inputs')
- args = parser.parse_args()
-
- # ---------------------- determine models according to model names ---------------------- #
- args.model_name = args.model_name.split('.')[0]
- if args.model_name in ['RealESRGAN_x4plus', 'RealESRNet_x4plus']: # x4 RRDBNet model
- model = RRDBNet(num_in_ch=3, num_out_ch=3, num_feat=64, num_block=23, num_grow_ch=32, scale=4)
- netscale = 4
- elif args.model_name in ['RealESRGAN_x4plus_anime_6B']: # x4 RRDBNet model with 6 blocks
- model = RRDBNet(num_in_ch=3, num_out_ch=3, num_feat=64, num_block=6, num_grow_ch=32, scale=4)
- netscale = 4
- elif args.model_name in ['RealESRGAN_x2plus']: # x2 RRDBNet model
- model = RRDBNet(num_in_ch=3, num_out_ch=3, num_feat=64, num_block=23, num_grow_ch=32, scale=2)
- netscale = 2
- elif args.model_name in [
- 'RealESRGANv2-anime-xsx2', 'RealESRGANv2-animevideo-xsx2-nousm', 'RealESRGANv2-animevideo-xsx2'
- ]: # x2 VGG-style model (XS size)
- model = SRVGGNetCompact(num_in_ch=3, num_out_ch=3, num_feat=64, num_conv=16, upscale=2, act_type='prelu')
- netscale = 2
- elif args.model_name in [
- 'RealESRGANv2-anime-xsx4', 'RealESRGANv2-animevideo-xsx4-nousm', 'RealESRGANv2-animevideo-xsx4'
- ]: # x4 VGG-style model (XS size)
- model = SRVGGNetCompact(num_in_ch=3, num_out_ch=3, num_feat=64, num_conv=16, upscale=4, act_type='prelu')
- netscale = 4
-
- # ---------------------- determine model paths ---------------------- #
- model_path = os.path.join('experiments/pretrained_models', args.model_name + '.pth')
- if not os.path.isfile(model_path):
- model_path = os.path.join('realesrgan/weights', args.model_name + '.pth')
- if not os.path.isfile(model_path):
- raise ValueError(f'Model {args.model_name} does not exist.')
-
- # restorer
- upsampler = RealESRGANer(
- scale=netscale,
- model_path=model_path,
- model=model,
- tile=args.tile,
- tile_pad=args.tile_pad,
- pre_pad=args.pre_pad,
- half=args.half)
-
- if args.face_enhance: # Use GFPGAN for face enhancement
- from gfpgan import GFPGANer
- face_enhancer = GFPGANer(
- model_path='https://github.com/TencentARC/GFPGAN/releases/download/v0.2.0/GFPGANCleanv1-NoCE-C2.pth',
- upscale=args.outscale,
- arch='clean',
- channel_multiplier=2,
- bg_upsampler=upsampler)
- os.makedirs(args.output, exist_ok=True)
- # for saving restored frames
- save_frame_folder = os.path.join(args.output, 'frames_tmpout')
- os.makedirs(save_frame_folder, exist_ok=True)
-
- if mimetypes.guess_type(args.input)[0].startswith('video'): # is a video file
- video_name = os.path.splitext(os.path.basename(args.input))[0]
- frame_folder = os.path.join('tmp_frames', video_name)
- os.makedirs(frame_folder, exist_ok=True)
- # use ffmpeg to extract frames
- os.system(f'ffmpeg -i {args.input} -qscale:v 1 -qmin 1 -qmax 1 -vsync 0 {frame_folder}/frame%08d.png')
- # get image path list
- paths = sorted(glob.glob(os.path.join(frame_folder, '*')))
- if args.video:
- if args.fps is None:
- # get input video fps
- import ffmpeg
- probe = ffmpeg.probe(args.input)
- video_streams = [stream for stream in probe['streams'] if stream['codec_type'] == 'video']
- args.fps = eval(video_streams[0]['avg_frame_rate'])
- elif mimetypes.guess_type(args.input)[0].startswith('image'): # is an image file
- paths = [args.input]
- video_name = 'video'
- else:
- paths = sorted(glob.glob(os.path.join(args.input, '*')))
- video_name = 'video'
-
- timer = AvgTimer()
- timer.start()
- pbar = tqdm(total=len(paths), unit='frame', desc='inference')
- # set up prefetch reader
- reader = PrefetchReader(paths, num_prefetch_queue=4)
- reader.start()
-
- que = queue.Queue()
- consumers = [IOConsumer(args, que, f'IO_{i}') for i in range(args.consumer)]
- for consumer in consumers:
- consumer.start()
-
- for idx, (path, img) in enumerate(zip(paths, reader)):
- imgname, extension = os.path.splitext(os.path.basename(path))
- if len(img.shape) == 3 and img.shape[2] == 4:
- img_mode = 'RGBA'
- else:
- img_mode = None
-
- try:
- if args.face_enhance:
- _, _, output = face_enhancer.enhance(img, has_aligned=False, only_center_face=False, paste_back=True)
- else:
- output, _ = upsampler.enhance(img, outscale=args.outscale)
- except RuntimeError as error:
- print('Error', error)
- print('If you encounter CUDA out of memory, try to set --tile with a smaller number.')
-
- else:
- if args.ext == 'auto':
- extension = extension[1:]
- else:
- extension = args.ext
- if img_mode == 'RGBA': # RGBA images should be saved in png format
- extension = 'png'
- save_path = os.path.join(save_frame_folder, f'{imgname}_out.{extension}')
-
- que.put({'output': output, 'save_path': save_path})
-
- pbar.update(1)
- torch.cuda.synchronize()
- timer.record()
- avg_fps = 1. / (timer.get_avg_time() + 1e-7)
- pbar.set_description(f'idx {idx}, fps {avg_fps:.2f}')
-
- for _ in range(args.consumer):
- que.put('quit')
- for consumer in consumers:
- consumer.join()
- pbar.close()
-
- # merge frames to video
- if args.video:
- video_save_path = os.path.join(args.output, f'{video_name}_{args.suffix}.mp4')
- if args.audio:
- os.system(
- f'ffmpeg -r {args.fps} -i {save_frame_folder}/frame%08d_out.{extension} -i {args.input}'
- f' -map 0:v:0 -map 1:a:0 -c:a copy -c:v libx264 -r {args.fps} -pix_fmt yuv420p {video_save_path}')
- else:
- os.system(f'ffmpeg -r {args.fps} -i {save_frame_folder}/frame%08d_out.{extension} '
- f'-c:v libx264 -r {args.fps} -pix_fmt yuv420p {video_save_path}')
-
- # delete tmp file
- shutil.rmtree(save_frame_folder)
- if os.path.isdir(frame_folder):
- shutil.rmtree(frame_folder)
-
-
-if __name__ == '__main__':
- main()
diff --git a/spaces/Eddycrack864/Applio-Inference/infer/lib/infer_pack/commons.py b/spaces/Eddycrack864/Applio-Inference/infer/lib/infer_pack/commons.py
deleted file mode 100644
index ccd334b7320543b0c3a2166f82093564c9721317..0000000000000000000000000000000000000000
--- a/spaces/Eddycrack864/Applio-Inference/infer/lib/infer_pack/commons.py
+++ /dev/null
@@ -1,167 +0,0 @@
-import math
-
-import numpy as np
-import torch
-from torch import nn
-from torch.nn import functional as F
-
-
-def init_weights(m, mean=0.0, std=0.01):
- classname = m.__class__.__name__
- if classname.find("Conv") != -1:
- m.weight.data.normal_(mean, std)
-
-
-def get_padding(kernel_size, dilation=1):
- return int((kernel_size * dilation - dilation) / 2)
-
-
-def convert_pad_shape(pad_shape):
- l = pad_shape[::-1]
- pad_shape = [item for sublist in l for item in sublist]
- return pad_shape
-
-
-def kl_divergence(m_p, logs_p, m_q, logs_q):
- """KL(P||Q)"""
- kl = (logs_q - logs_p) - 0.5
- kl += (
- 0.5 * (torch.exp(2.0 * logs_p) + ((m_p - m_q) ** 2)) * torch.exp(-2.0 * logs_q)
- )
- return kl
-
-
-def rand_gumbel(shape):
- """Sample from the Gumbel distribution, protect from overflows."""
- uniform_samples = torch.rand(shape) * 0.99998 + 0.00001
- return -torch.log(-torch.log(uniform_samples))
-
-
-def rand_gumbel_like(x):
- g = rand_gumbel(x.size()).to(dtype=x.dtype, device=x.device)
- return g
-
-
-def slice_segments(x, ids_str, segment_size=4):
- ret = torch.zeros_like(x[:, :, :segment_size])
- for i in range(x.size(0)):
- idx_str = ids_str[i]
- idx_end = idx_str + segment_size
- ret[i] = x[i, :, idx_str:idx_end]
- return ret
-
-
-def slice_segments2(x, ids_str, segment_size=4):
- ret = torch.zeros_like(x[:, :segment_size])
- for i in range(x.size(0)):
- idx_str = ids_str[i]
- idx_end = idx_str + segment_size
- ret[i] = x[i, idx_str:idx_end]
- return ret
-
-
-def rand_slice_segments(x, x_lengths=None, segment_size=4):
- b, d, t = x.size()
- if x_lengths is None:
- x_lengths = t
- ids_str_max = x_lengths - segment_size + 1
- ids_str = (torch.rand([b]).to(device=x.device) * ids_str_max).to(dtype=torch.long)
- ret = slice_segments(x, ids_str, segment_size)
- return ret, ids_str
-
-
-def get_timing_signal_1d(length, channels, min_timescale=1.0, max_timescale=1.0e4):
- position = torch.arange(length, dtype=torch.float)
- num_timescales = channels // 2
- log_timescale_increment = math.log(float(max_timescale) / float(min_timescale)) / (
- num_timescales - 1
- )
- inv_timescales = min_timescale * torch.exp(
- torch.arange(num_timescales, dtype=torch.float) * -log_timescale_increment
- )
- scaled_time = position.unsqueeze(0) * inv_timescales.unsqueeze(1)
- signal = torch.cat([torch.sin(scaled_time), torch.cos(scaled_time)], 0)
- signal = F.pad(signal, [0, 0, 0, channels % 2])
- signal = signal.view(1, channels, length)
- return signal
-
-
-def add_timing_signal_1d(x, min_timescale=1.0, max_timescale=1.0e4):
- b, channels, length = x.size()
- signal = get_timing_signal_1d(length, channels, min_timescale, max_timescale)
- return x + signal.to(dtype=x.dtype, device=x.device)
-
-
-def cat_timing_signal_1d(x, min_timescale=1.0, max_timescale=1.0e4, axis=1):
- b, channels, length = x.size()
- signal = get_timing_signal_1d(length, channels, min_timescale, max_timescale)
- return torch.cat([x, signal.to(dtype=x.dtype, device=x.device)], axis)
-
-
-def subsequent_mask(length):
- mask = torch.tril(torch.ones(length, length)).unsqueeze(0).unsqueeze(0)
- return mask
-
-
-@torch.jit.script
-def fused_add_tanh_sigmoid_multiply(input_a, input_b, n_channels):
- n_channels_int = n_channels[0]
- in_act = input_a + input_b
- t_act = torch.tanh(in_act[:, :n_channels_int, :])
- s_act = torch.sigmoid(in_act[:, n_channels_int:, :])
- acts = t_act * s_act
- return acts
-
-
-def convert_pad_shape(pad_shape):
- l = pad_shape[::-1]
- pad_shape = [item for sublist in l for item in sublist]
- return pad_shape
-
-
-def shift_1d(x):
- x = F.pad(x, convert_pad_shape([[0, 0], [0, 0], [1, 0]]))[:, :, :-1]
- return x
-
-
-def sequence_mask(length, max_length=None):
- if max_length is None:
- max_length = length.max()
- x = torch.arange(max_length, dtype=length.dtype, device=length.device)
- return x.unsqueeze(0) < length.unsqueeze(1)
-
-
-def generate_path(duration, mask):
- """
- duration: [b, 1, t_x]
- mask: [b, 1, t_y, t_x]
- """
- device = duration.device
-
- b, _, t_y, t_x = mask.shape
- cum_duration = torch.cumsum(duration, -1)
-
- cum_duration_flat = cum_duration.view(b * t_x)
- path = sequence_mask(cum_duration_flat, t_y).to(mask.dtype)
- path = path.view(b, t_x, t_y)
- path = path - F.pad(path, convert_pad_shape([[0, 0], [1, 0], [0, 0]]))[:, :-1]
- path = path.unsqueeze(1).transpose(2, 3) * mask
- return path
-
-
-def clip_grad_value_(parameters, clip_value, norm_type=2):
- if isinstance(parameters, torch.Tensor):
- parameters = [parameters]
- parameters = list(filter(lambda p: p.grad is not None, parameters))
- norm_type = float(norm_type)
- if clip_value is not None:
- clip_value = float(clip_value)
-
- total_norm = 0
- for p in parameters:
- param_norm = p.grad.data.norm(norm_type)
- total_norm += param_norm.item() ** norm_type
- if clip_value is not None:
- p.grad.data.clamp_(min=-clip_value, max=clip_value)
- total_norm = total_norm ** (1.0 / norm_type)
- return total_norm
diff --git a/spaces/Eddycrack864/Applio-Inference/lib/uvr5_pack/lib_v5/nets_33966KB.py b/spaces/Eddycrack864/Applio-Inference/lib/uvr5_pack/lib_v5/nets_33966KB.py
deleted file mode 100644
index b8986f968dc5383e65d35aac6e4367299de3378b..0000000000000000000000000000000000000000
--- a/spaces/Eddycrack864/Applio-Inference/lib/uvr5_pack/lib_v5/nets_33966KB.py
+++ /dev/null
@@ -1,122 +0,0 @@
-import torch
-from torch import nn
-import torch.nn.functional as F
-
-from . import layers_33966KB as layers
-
-
-class BaseASPPNet(nn.Module):
- def __init__(self, nin, ch, dilations=(4, 8, 16, 32)):
- super(BaseASPPNet, self).__init__()
- self.enc1 = layers.Encoder(nin, ch, 3, 2, 1)
- self.enc2 = layers.Encoder(ch, ch * 2, 3, 2, 1)
- self.enc3 = layers.Encoder(ch * 2, ch * 4, 3, 2, 1)
- self.enc4 = layers.Encoder(ch * 4, ch * 8, 3, 2, 1)
-
- self.aspp = layers.ASPPModule(ch * 8, ch * 16, dilations)
-
- self.dec4 = layers.Decoder(ch * (8 + 16), ch * 8, 3, 1, 1)
- self.dec3 = layers.Decoder(ch * (4 + 8), ch * 4, 3, 1, 1)
- self.dec2 = layers.Decoder(ch * (2 + 4), ch * 2, 3, 1, 1)
- self.dec1 = layers.Decoder(ch * (1 + 2), ch, 3, 1, 1)
-
- def __call__(self, x):
- h, e1 = self.enc1(x)
- h, e2 = self.enc2(h)
- h, e3 = self.enc3(h)
- h, e4 = self.enc4(h)
-
- h = self.aspp(h)
-
- h = self.dec4(h, e4)
- h = self.dec3(h, e3)
- h = self.dec2(h, e2)
- h = self.dec1(h, e1)
-
- return h
-
-
-class CascadedASPPNet(nn.Module):
- def __init__(self, n_fft):
- super(CascadedASPPNet, self).__init__()
- self.stg1_low_band_net = BaseASPPNet(2, 16)
- self.stg1_high_band_net = BaseASPPNet(2, 16)
-
- self.stg2_bridge = layers.Conv2DBNActiv(18, 8, 1, 1, 0)
- self.stg2_full_band_net = BaseASPPNet(8, 16)
-
- self.stg3_bridge = layers.Conv2DBNActiv(34, 16, 1, 1, 0)
- self.stg3_full_band_net = BaseASPPNet(16, 32)
-
- self.out = nn.Conv2d(32, 2, 1, bias=False)
- self.aux1_out = nn.Conv2d(16, 2, 1, bias=False)
- self.aux2_out = nn.Conv2d(16, 2, 1, bias=False)
-
- self.max_bin = n_fft // 2
- self.output_bin = n_fft // 2 + 1
-
- self.offset = 128
-
- def forward(self, x, aggressiveness=None):
- mix = x.detach()
- x = x.clone()
-
- x = x[:, :, : self.max_bin]
-
- bandw = x.size()[2] // 2
- aux1 = torch.cat(
- [
- self.stg1_low_band_net(x[:, :, :bandw]),
- self.stg1_high_band_net(x[:, :, bandw:]),
- ],
- dim=2,
- )
-
- h = torch.cat([x, aux1], dim=1)
- aux2 = self.stg2_full_band_net(self.stg2_bridge(h))
-
- h = torch.cat([x, aux1, aux2], dim=1)
- h = self.stg3_full_band_net(self.stg3_bridge(h))
-
- mask = torch.sigmoid(self.out(h))
- mask = F.pad(
- input=mask,
- pad=(0, 0, 0, self.output_bin - mask.size()[2]),
- mode="replicate",
- )
-
- if self.training:
- aux1 = torch.sigmoid(self.aux1_out(aux1))
- aux1 = F.pad(
- input=aux1,
- pad=(0, 0, 0, self.output_bin - aux1.size()[2]),
- mode="replicate",
- )
- aux2 = torch.sigmoid(self.aux2_out(aux2))
- aux2 = F.pad(
- input=aux2,
- pad=(0, 0, 0, self.output_bin - aux2.size()[2]),
- mode="replicate",
- )
- return mask * mix, aux1 * mix, aux2 * mix
- else:
- if aggressiveness:
- mask[:, :, : aggressiveness["split_bin"]] = torch.pow(
- mask[:, :, : aggressiveness["split_bin"]],
- 1 + aggressiveness["value"] / 3,
- )
- mask[:, :, aggressiveness["split_bin"] :] = torch.pow(
- mask[:, :, aggressiveness["split_bin"] :],
- 1 + aggressiveness["value"],
- )
-
- return mask * mix
-
- def predict(self, x_mag, aggressiveness=None):
- h = self.forward(x_mag, aggressiveness)
-
- if self.offset > 0:
- h = h[:, :, :, self.offset : -self.offset]
- assert h.size()[3] > 0
-
- return h
diff --git a/spaces/Enutrof/GenreClassifier/inference.py b/spaces/Enutrof/GenreClassifier/inference.py
deleted file mode 100644
index ee806432c0eda2431e5770de2b12b34287a9eab5..0000000000000000000000000000000000000000
--- a/spaces/Enutrof/GenreClassifier/inference.py
+++ /dev/null
@@ -1,36 +0,0 @@
-import numpy as np
-import requests
-
-from tensorflow import keras
-
-def get_mfccs(filename):
- # Load the file to send
- files = {'audio': open(filename, 'rb')}
- # Send the HTTP request and get the reply
- reply = requests.post("https://librosa-utils.herokuapp.com/mfcc_batch", files=files)
- # Extract the text from the reply and decode the JSON into a list
- pitch_track = reply.json()
- print(np.shape(pitch_track['mfccs']))
- return np.array(pitch_track['mfccs'])
-
-def inference(filename, model_path='gtzan10_lstm_0.7179_l_1.12.h5'):
- model = keras.models.load_model(model_path)
- mapping = ['blues',
- 'classical',
- 'country',
- 'disco',
- 'hiphop',
- 'jazz',
- 'metal',
- 'pop',
- 'reggae',
- 'rock']
- mfcc = get_mfccs(filename)
- pred = model.predict(mfcc)
- genre = [mapping[i] for i in np.argmax(pred, axis=1)]
-
- counter_ = {}
- for i in genre:
- counter_[genre.count(i)] = i
- m = max(counter_)
- return f"Genre: {counter_[m]}, Confidence: {max(counter_)/pred.shape[0]}"
diff --git a/spaces/GEM/DatasetCardForm/datacards/__init__.py b/spaces/GEM/DatasetCardForm/datacards/__init__.py
deleted file mode 100644
index 637893df31c24c546f49e7a5d4bf3f8a3023db62..0000000000000000000000000000000000000000
--- a/spaces/GEM/DatasetCardForm/datacards/__init__.py
+++ /dev/null
@@ -1,6 +0,0 @@
-from .considerations import considerations_page, considerations_summary
-from .context import context_page, context_summary
-from .curation import curation_page, curation_summary
-from .gem import gem_page, gem_summary
-from .overview import overview_page, overview_summary
-from .results import results_page, results_summary
diff --git a/spaces/GIZ/SDSN-demo/ver0.1 scripts/keyword_search.py b/spaces/GIZ/SDSN-demo/ver0.1 scripts/keyword_search.py
deleted file mode 100644
index 46765f25b613f591d30c2b9ebc377c4de54755d6..0000000000000000000000000000000000000000
--- a/spaces/GIZ/SDSN-demo/ver0.1 scripts/keyword_search.py
+++ /dev/null
@@ -1,169 +0,0 @@
-# set path
-import glob, os, sys
-from udfPreprocess.search import semantic_search
-sys.path.append('../udfPreprocess')
-
-#import helper
-import udfPreprocess.docPreprocessing as pre
-import udfPreprocess.cleaning as clean
-from udfPreprocess.search import bm25_tokenizer, bm25TokenizeDoc, lexical_search
-#import needed libraries
-import seaborn as sns
-from pandas import DataFrame
-from sentence_transformers import SentenceTransformer, CrossEncoder, util
-# from keybert import KeyBERT
-from transformers import pipeline
-import matplotlib.pyplot as plt
-import numpy as np
-import streamlit as st
-import pandas as pd
-from rank_bm25 import BM25Okapi
-from sklearn.feature_extraction import _stop_words
-import string
-from tqdm.autonotebook import tqdm
-import numpy as np
-import docx
-from docx.shared import Inches
-from docx.shared import Pt
-from docx.enum.style import WD_STYLE_TYPE
-import logging
-logger = logging.getLogger(__name__)
-import tempfile
-import sqlite3
-import json
-import configparser
-
-
-def app():
-
- with st.container():
- st.markdown(" Search ",
- unsafe_allow_html=True)
- st.write(' ')
- st.write(' ')
-
- with st.expander("ℹ️ - About this app", expanded=False):
-
- st.write(
- """
- The *Keyword Search* app is an easy-to-use interface \
- built in Streamlit for doing keyword search in \
- policy document - developed by GIZ Data and the \
- Sustainable Development Solution Network.
- """)
-
- st.markdown("")
-
-
-
- with st.sidebar:
- with open('sample/keywordexample.json','r') as json_file:
- keywordexample = json.load(json_file)
-
- genre = st.radio("Select Keyword Category", list(keywordexample.keys()))
- if genre == 'Food':
- keywordList = keywordexample['Food']
- elif genre == 'Climate':
- keywordList = keywordexample['Climate']
- elif genre == 'Social':
- keywordList = keywordexample['Social']
- elif genre == 'Nature':
- keywordList = keywordexample['Nature']
- elif genre == 'Implementation':
- keywordList = keywordexample['Implementation']
- else:
- keywordList = None
-
- searchtype = st.selectbox("Do you want to find exact macthes or similar meaning/context", ['Exact Matches', 'Similar context/meaning'])
-
-
- with st.container():
- if keywordList is not None:
- queryList = st.text_input("You selcted the {} category we will look for these keywords in document".format(genre),
- value="{}".format(keywordList))
- else:
- queryList = st.text_input("Please enter here your question and we will look \
- for an answer in the document OR enter the keyword you \
- are looking for and we will \
- we will look for similar context \
- in the document.",
- placeholder="Enter keyword here")
-
- if st.button("Find them"):
-
- if queryList == "":
- st.info("🤔 No keyword provided, if you dont have any, please try example sets from sidebar!")
- logging.warning("Terminated as no keyword provided")
- else:
-
- if 'docs' in st.session_state:
- docs = st.session_state['docs']
- paraList = st.session_state['paraList']
-
- if searchtype == 'Exact Matches':
- queryList = list(queryList.split(","))
- logging.info("performing lexical search")
- tokenized_corpus = bm25TokenizeDoc(paraList)
- # st.write(len(tokenized_corpus))
- document_bm25 = BM25Okapi(tokenized_corpus)
-
- with st.spinner("Performing Exact matching search (Lexical search) for you"):
- st.markdown("##### Top few lexical search (BM25) hits #####")
-
- for keyword in queryList:
-
- bm25_hits = lexical_search(keyword,document_bm25)
-
-
- counter = 0
- for hit in bm25_hits:
- if hit['score'] > 0.00:
- counter += 1
- if counter == 1:
- st.markdown("###### Results for keyword: **{}** ######".format(keyword))
- # st.write("\t Score: {:.3f}: \t{}".format(hit['score'], paraList[hit['corpus_id']].replace("\n", " ")))
- st.write("\t {}: {}\t".format(counter, paraList[hit['corpus_id']].replace("\n", " ")))
-
-
- if counter == 0:
- st.write("No results found for '**{}**' ".format(keyword))
-
- st.markdown("---")
- else:
- logging.info("starting semantic search")
- with st.spinner("Performing Similar/Contextual search"):
- query = "Find {} related issues ?".format(queryList)
- config = configparser.ConfigParser()
- config.read_file(open('udfPreprocess/paramconfig.cfg'))
- threshold = float(config.get('semantic_search','THRESHOLD'))
- # st.write(query)
- semantic_hits = semantic_search(query,paraList)
- st.markdown("##### Few Semantic search hits for {} related topics #####".format(queryList))
-
- for i,queryhit in enumerate(semantic_hits):
-
- # st.markdown("###### Results for query: **{}** ######".format(queryList[i]))
- counter = 0
- for hit in queryhit:
- counter += 1
-
-
- if hit['score'] > threshold:
- # st.write("\t Score: {:.3f}: \t{}".format(hit['score'], paraList[hit['corpus_id']].replace("\n", " ")))
- st.write("\t {}: \t {}".format(counter, paraList[hit['corpus_id']].replace("\n", " ")))
-
- # document.add_paragraph("\t Score: {:.3f}: \t{}".format(hit['score'], paraList[hit['corpus_id']].replace("\n", " ")))
- st.markdown("---")
- # st.write(semantic_hits)
-
-
-
-
- else:
- st.info("🤔 No document found, please try to upload it at the sidebar!")
- logging.warning("Terminated as no keyword provided")
-
-
-
-
\ No newline at end of file
diff --git a/spaces/Gen-Sim/Gen-Sim/cliport/generated_tasks/sorting_blocks_into_pallets.py b/spaces/Gen-Sim/Gen-Sim/cliport/generated_tasks/sorting_blocks_into_pallets.py
deleted file mode 100644
index a1cb5eadf470a02476cb0b43548a6c3b25325a9b..0000000000000000000000000000000000000000
--- a/spaces/Gen-Sim/Gen-Sim/cliport/generated_tasks/sorting_blocks_into_pallets.py
+++ /dev/null
@@ -1,51 +0,0 @@
-import numpy as np
-import os
-import pybullet as p
-import random
-from cliport.tasks import primitives
-from cliport.tasks.grippers import Spatula
-from cliport.tasks.task import Task
-from cliport.utils import utils
-import numpy as np
-from cliport.tasks.task import Task
-from cliport.utils import utils
-
-class SortingBlocksIntoPallets(Task):
- """Pick up blocks of four different colors (red, blue, green, yellow) and place them into four separate pallets of matching color. The pallets are placed in a row and the blocks are scattered randomly on the table."""
-
- def __init__(self):
- super().__init__()
- self.max_steps = 20
- self.lang_template = "put the {color} block into the {color} pallet"
- self.task_completed_desc = "done sorting blocks into pallets."
- self.additional_reset()
-
- def reset(self, env):
- super().reset(env)
-
- # Add pallets.
- # x, y, z dimensions for the asset size
- pallet_size = (0.12, 0.12, 0.02)
- pallet_urdf = 'pallet/pallet.urdf'
- pallet_poses = []
- pallet_colors = ['red', 'blue', 'green', 'yellow']
- for color in pallet_colors:
- pallet_pose = self.get_random_pose(env, pallet_size)
- env.add_object(pallet_urdf, pallet_pose, 'fixed', color=utils.COLORS[color])
- pallet_poses.append(pallet_pose)
-
- # Add blocks.
- # x, y, z dimensions for the asset size
- blocks = []
- block_size = (0.04, 0.04, 0.04)
- block_urdf = 'block/block.urdf'
- for color in pallet_colors:
- block_pose = self.get_random_pose(env, block_size)
- block_id = env.add_object(block_urdf, block_pose, color=utils.COLORS[color])
- blocks.append(block_id)
-
- # Goal: each block is in a different pallet of matching color.
- for i in range(len(blocks)):
- self.add_goal(objs=[blocks[i]], matches=np.ones((1, 1)), targ_poses=[pallet_poses[i]], replace=False,
- rotations=True, metric='pose', params=None, step_max_reward=1/len(blocks),
- language_goal=self.lang_template.format(color=pallet_colors[i]))
\ No newline at end of file
diff --git a/spaces/Gradio-Blocks/anime-colorization/pixel_guide_diffusion/image_datasets.py b/spaces/Gradio-Blocks/anime-colorization/pixel_guide_diffusion/image_datasets.py
deleted file mode 100644
index 2eec69426004e2f325960df7d0ccef79be0453c3..0000000000000000000000000000000000000000
--- a/spaces/Gradio-Blocks/anime-colorization/pixel_guide_diffusion/image_datasets.py
+++ /dev/null
@@ -1,173 +0,0 @@
-from PIL import Image
-import blobfile as bf
-from mpi4py import MPI
-import numpy as np
-from torch.utils.data import DataLoader, Dataset
-
-import PIL.ImageFile
-PIL.ImageFile.LOAD_TRUNCATED_IMAGES = True
-
-
-def load_data(
- *, data_dir, batch_size, image_size, class_cond=False, guide_size=0, guide_dir=None, crop_size=0, deterministic=False
-):
- """
- For a dataset, create a generator over (images, kwargs) pairs.
-
- Each images is an NCHW float tensor, and the kwargs dict contains zero or
- more keys, each of which map to a batched Tensor of their own.
- The kwargs dict can be used for class labels, in which case the key is "y"
- and the values are integer tensors of class labels.
-
- :param data_dir: a dataset directory.
- :param batch_size: the batch size of each returned pair.
- :param image_size: the size to which images are resized.
- :param class_cond: if True, include a "y" key in returned dicts for class
- label. If classes are not available and this is true, an
- exception will be raised.
- :param guide_size: the size to which images are resized for guide tensors.
- :param guide_dir: a dataset directory for guide tensors.
- :param crop_size: the size to which images are resized and cropped.
- :param deterministic: if True, yield results in a deterministic order.
- """
- if not data_dir:
- raise ValueError("unspecified data directory")
- all_files = _list_image_files_recursively(data_dir)
- guide_files = None
- if guide_dir:
- guide_files = _list_image_files_recursively(guide_dir)
- guide_files2 = _list_image_files_recursively('data/danbooru2017/anime_sketch_noise')
- classes = None
- if class_cond:
- # Assume classes are the first part of the filename,
- # before an underscore.
- class_names = [bf.basename(path).split("_")[0] for path in all_files]
- sorted_classes = {x: i for i, x in enumerate(sorted(set(class_names)))}
- classes = [sorted_classes[x] for x in class_names]
- dataset = ImageDataset(
- image_size,
- all_files,
- guide_resolution=guide_size,
- guide_paths=guide_files,
- guide_paths2=guide_files2,
- crop_resolution=crop_size,
- classes=classes,
- shard=MPI.COMM_WORLD.Get_rank(),
- num_shards=MPI.COMM_WORLD.Get_size(),
- )
- if deterministic:
- loader = DataLoader(
- dataset, batch_size=batch_size, shuffle=False, num_workers=1, drop_last=True
- )
- else:
- loader = DataLoader(
- dataset, batch_size=batch_size, shuffle=True, num_workers=1, drop_last=True
- )
- while True:
- yield from loader
-
-
-def _list_image_files_recursively(data_dir):
- results = []
- for entry in sorted(bf.listdir(data_dir)):
- full_path = bf.join(data_dir, entry)
- ext = entry.split(".")[-1]
- if "." in entry and ext.lower() in ["jpg", "jpeg", "png", "gif"]:
- results.append(full_path)
- elif bf.isdir(full_path):
- results.extend(_list_image_files_recursively(full_path))
- return sorted(results)
-
-
-class ImageDataset(Dataset):
- def __init__(self, resolution, image_paths, guide_resolution=0, guide_paths=None, guide_paths2=None, crop_resolution=0, classes=None, shard=0, num_shards=1):
- super().__init__()
- self.resolution = resolution
- self.guide_resolution = guide_resolution
- self.local_images = image_paths[shard:][::num_shards]
- self.local_guides = guide_paths[shard:][::num_shards] if guide_paths else None
- self.local_guides2 = guide_paths2[shard:][::num_shards] if guide_paths else None
- self.crop_resolution = crop_resolution if crop_resolution > 0 else resolution
- self.local_classes = None if classes is None else classes[shard:][::num_shards]
-
- def __len__(self):
- return len(self.local_images) * 1000000
-
- def __getitem__(self, idx):
- idx = idx % len(self.local_images)
- path = self.local_images[idx]
- with bf.BlobFile(path, "rb") as f:
- pil_image = Image.open(f)
- pil_image.load()
-
- # We are not on a new enough PIL to support the `reducing_gap`
- # argument, which uses BOX downsampling at powers of two first.
- # Thus, we do it by hand to improve downsample quality.
- while min(*pil_image.size) >= 2 * self.resolution:
- pil_image = pil_image.resize(
- tuple(x // 2 for x in pil_image.size), resample=Image.BOX
- )
-
- scale = self.resolution / min(*pil_image.size)
- pil_image = pil_image.resize(
- tuple(round(x * scale) for x in pil_image.size), resample=Image.BICUBIC
- )
-
- arr = np.array(pil_image.convert("RGB"))
- crop_y = (arr.shape[0] - self.crop_resolution) // 2
- crop_x = (arr.shape[1] - self.crop_resolution) // 2
- arr = arr[crop_y : crop_y + self.crop_resolution, crop_x : crop_x + self.crop_resolution]
- arr = arr.astype(np.float32) / 127.5 - 1
-
- out_dict = {}
-
- if self.local_guides:
- path = self.local_guides[idx] if np.random.rand() < 0.5 else self.local_guides2[idx]
- with bf.BlobFile(path, "rb") as f:
- pil_image = Image.open(f)
- pil_image.load()
-
- # We are not on a new enough PIL to support the `reducing_gap`
- # argument, which uses BOX downsampling at powers of two first.
- # Thus, we do it by hand to improve downsample quality.
- while min(*pil_image.size) >= 2 * self.guide_resolution:
- pil_image = pil_image.resize(
- tuple(x // 2 for x in pil_image.size), resample=Image.BOX
- )
-
- scale = self.guide_resolution / min(*pil_image.size)
- pil_image = pil_image.resize(
- tuple(round(x * scale) for x in pil_image.size), resample=Image.BICUBIC
- )
-
- crop_resolution = self.guide_resolution // self.resolution * self.crop_resolution
-
- guide_arr = np.array(pil_image.convert("L"))[...,None] # np.array(pil_image.convert("RGB"))
-
- # extra noise
- if np.random.rand() < 0.5:
- w, h = guide_arr.shape[:2][::-1]
- a = np.random.randint(2,12)
- mean = np.asarray(
- Image.fromarray(
- np.random.randint(0,255,[a,a],dtype='uint8')
- ).resize([w,h], Image.NEAREST)
- ).astype('float32') / 255.0 * 2 - 1
- std = np.asarray(
- Image.fromarray(
- np.random.randint(0,255,[a,a],dtype='uint8')
- ).resize([w, h], Image.NEAREST)
- ).astype('float32') / 255.0 * 7.5 + 0.125
- guide_arr = (guide_arr - mean[...,None]) * std[...,None]
-
- crop_y = (guide_arr.shape[0] - crop_resolution) // 2
- crop_x = (guide_arr.shape[1] - crop_resolution) // 2
- guide_arr = guide_arr[crop_y : crop_y + crop_resolution, crop_x : crop_x + crop_resolution]
- guide_arr = guide_arr.astype(np.float32) / 127.5 - 1
-
- out_dict["guide"] = np.transpose(guide_arr, [2, 0, 1]).astype('float32')
-
- if self.local_classes is not None:
- out_dict["y"] = np.array(self.local_classes[idx], dtype=np.int64)
-
- return np.transpose(arr, [2, 0, 1]), out_dict
diff --git a/spaces/GrandaddyShmax/MusicGen_Plus_hfv2/audiocraft/data/zip.py b/spaces/GrandaddyShmax/MusicGen_Plus_hfv2/audiocraft/data/zip.py
deleted file mode 100644
index 1f1154231da321dd38d151ff285dbcff5e38a6e0..0000000000000000000000000000000000000000
--- a/spaces/GrandaddyShmax/MusicGen_Plus_hfv2/audiocraft/data/zip.py
+++ /dev/null
@@ -1,74 +0,0 @@
-# Copyright (c) Meta Platforms, Inc. and affiliates.
-# All rights reserved.
-#
-# This source code is licensed under the license found in the
-# LICENSE file in the root directory of this source tree.
-
-import typing
-import zipfile
-
-from dataclasses import dataclass
-from functools import lru_cache
-from typing_extensions import Literal
-
-
-DEFAULT_SIZE = 32
-MODE = Literal['r', 'w', 'x', 'a']
-
-
-@dataclass(order=True)
-class PathInZip:
- """Class for holding a path of file within a zip file.
-
- Args:
- path: The convention is :
- Let's assume there is a zip file /some/location/foo.zip
- and inside of it is a json file located at /data/file1.json,
- Then we expect path = "/some/location/foo.zip:/data/file1.json"
- """
-
- INFO_PATH_SEP = ':'
- zip_path: str
- file_path: str
-
- def __init__(self, path: str) -> None:
- split_path = path.split(self.INFO_PATH_SEP)
- assert len(split_path) == 2
- self.zip_path, self.file_path = split_path
-
- @classmethod
- def from_paths(cls, zip_path: str, file_path: str):
- return cls(zip_path + cls.INFO_PATH_SEP + file_path)
-
- def __str__(self) -> str:
- return self.zip_path + self.INFO_PATH_SEP + self.file_path
-
-
-def _open_zip(path: str, mode: MODE = 'r'):
- return zipfile.ZipFile(path, mode)
-
-
-_cached_open_zip = lru_cache(DEFAULT_SIZE)(_open_zip)
-
-
-def set_zip_cache_size(max_size: int):
- """Sets the maximal LRU caching for zip file opening.
-
- Args:
- max_size: the maximal LRU cache.
- """
- global _cached_open_zip
- _cached_open_zip = lru_cache(max_size)(_open_zip)
-
-
-def open_file_in_zip(path_in_zip: PathInZip, mode: str = 'r') -> typing.IO:
- """Opens a file stored inside a zip and returns a file-like object.
-
- Args:
- path_in_zip: A PathInZip object representing the file to return a file-like object of.
- mode: The mode in which to open the file with.
- Returns:
- A file-like object for PathInZip.
- """
- zf = _cached_open_zip(path_in_zip.zip_path)
- return zf.open(path_in_zip.file_path)
diff --git a/spaces/Hallucinate/demo/model_io.py b/spaces/Hallucinate/demo/model_io.py
deleted file mode 100644
index 16d505295c16a5fce124a1fbfb4994f8af5c4255..0000000000000000000000000000000000000000
--- a/spaces/Hallucinate/demo/model_io.py
+++ /dev/null
@@ -1,72 +0,0 @@
-import os
-
-import torch
-
-
-def save_weights(model, filename, path="./saved_models"):
- if not os.path.isdir(path):
- os.makedirs(path)
-
- fpath = os.path.join(path, filename)
- torch.save(model.state_dict(), fpath)
- return
-
-
-def save_checkpoint(model, optimizer, epoch, filename, root="./checkpoints"):
- if not os.path.isdir(root):
- os.makedirs(root)
-
- fpath = os.path.join(root, filename)
- torch.save(
- {
- "model": model.state_dict(),
- "optimizer": optimizer.state_dict(),
- "epoch": epoch
- }
- , fpath)
-
-
-def load_weights(model, filename, path="./saved_models"):
- fpath = os.path.join(path, filename)
- state_dict = torch.load(fpath)
- model.load_state_dict(state_dict)
- return model
-
-
-def load_checkpoint(fpath, model, optimizer=None):
- ckpt = torch.load(fpath, map_location='cpu')
- if optimizer is None:
- optimizer = ckpt.get('optimizer', None)
- else:
- optimizer.load_state_dict(ckpt['optimizer'])
- epoch = ckpt['epoch']
-
- if 'model' in ckpt:
- ckpt = ckpt['model']
- load_dict = {}
- for k, v in ckpt.items():
- if k.startswith('module.'):
- k_ = k.replace('module.', '')
- load_dict[k_] = v
- else:
- load_dict[k] = v
-
- modified = {} # backward compatibility to older naming of architecture blocks
- for k, v in load_dict.items():
- if k.startswith('adaptive_bins_layer.embedding_conv.'):
- k_ = k.replace('adaptive_bins_layer.embedding_conv.',
- 'adaptive_bins_layer.conv3x3.')
- modified[k_] = v
- # del load_dict[k]
-
- elif k.startswith('adaptive_bins_layer.patch_transformer.embedding_encoder'):
-
- k_ = k.replace('adaptive_bins_layer.patch_transformer.embedding_encoder',
- 'adaptive_bins_layer.patch_transformer.embedding_convPxP')
- modified[k_] = v
- # del load_dict[k]
- else:
- modified[k] = v # else keep the original
-
- model.load_state_dict(modified)
- return model, optimizer, epoch
\ No newline at end of file
diff --git a/spaces/HaloMaster/chinesesummary/fengshen/examples/classification/demo_classification_afqmc_erlangshen_offload.sh b/spaces/HaloMaster/chinesesummary/fengshen/examples/classification/demo_classification_afqmc_erlangshen_offload.sh
deleted file mode 100644
index f5ff555aa60e3cebd544b92a18443eb7505f8ae8..0000000000000000000000000000000000000000
--- a/spaces/HaloMaster/chinesesummary/fengshen/examples/classification/demo_classification_afqmc_erlangshen_offload.sh
+++ /dev/null
@@ -1,103 +0,0 @@
-MODEL_NAME="IDEA-CCNL/Erlangshen-MegatronBert-1.3B"
-
-TEXTA_NAME=sentence1
-TEXTB_NAME=sentence2
-LABEL_NAME=label
-ID_NAME=id
-
-BATCH_SIZE=1
-VAL_BATCH_SIZE=1
-ZERO_STAGE=3
-config_json="./ds_config.json"
-
-cat < $config_json
-{
- "train_micro_batch_size_per_gpu": $BATCH_SIZE,
- "steps_per_print": 1000,
- "gradient_clipping": 1,
- "zero_optimization": {
- "stage": ${ZERO_STAGE},
- "offload_optimizer": {
- "device": "cpu",
- "pin_memory": true
- },
- "offload_param": {
- "device": "cpu",
- "pin_memory": true
- },
- "overlap_comm": true,
- "contiguous_gradients": true,
- "sub_group_size": 1e9,
- "stage3_max_live_parameters": 1e9,
- "stage3_max_reuse_distance": 1e9
- },
- "zero_allow_untested_optimizer": false,
- "fp16": {
- "enabled": true,
- "loss_scale": 0,
- "loss_scale_window": 1000,
- "hysteresis": 2,
- "min_loss_scale": 1
- },
- "activation_checkpointing": {
- "partition_activations": false,
- "contiguous_memory_optimization": false
- },
- "wall_clock_breakdown": false
-}
-EOT
-
-export PL_DEEPSPEED_CONFIG_PATH=$config_json
-
-DATA_ARGS="\
- --dataset_name IDEA-CCNL/AFQMC \
- --train_batchsize $BATCH_SIZE \
- --valid_batchsize $VAL_BATCH_SIZE \
- --max_length 128 \
- --texta_name $TEXTA_NAME \
- --textb_name $TEXTB_NAME \
- --label_name $LABEL_NAME \
- --id_name $ID_NAME \
- "
-
-MODEL_ARGS="\
- --learning_rate 1e-5 \
- --weight_decay 1e-1 \
- --warmup_ratio 0.01 \
- --num_labels 2 \
- --model_type huggingface-auto \
- "
-
-MODEL_CHECKPOINT_ARGS="\
- --monitor val_acc \
- --save_top_k 3 \
- --mode max \
- --every_n_train_steps 0 \
- --save_weights_only True \
- --dirpath . \
- --filename model-{epoch:02d}-{val_acc:.4f} \
- "
-
-
-TRAINER_ARGS="\
- --max_epochs 67 \
- --gpus 1 \
- --num_nodes 1 \
- --strategy deepspeed_stage_${ZERO_STAGE}_offload \
- --gradient_clip_val 1.0 \
- --check_val_every_n_epoch 1 \
- --val_check_interval 1.0 \
- --precision 16 \
- --default_root_dir . \
- "
-
-options=" \
- --pretrained_model_path $MODEL_NAME \
- $DATA_ARGS \
- $MODEL_ARGS \
- $MODEL_CHECKPOINT_ARGS \
- $TRAINER_ARGS \
- "
-
-python3 finetune_classification.py $options
-
diff --git a/spaces/HarryLee/eCommerceImageCaptioning/fairseq/examples/speech_text_joint_to_text/tasks/__init__.py b/spaces/HarryLee/eCommerceImageCaptioning/fairseq/examples/speech_text_joint_to_text/tasks/__init__.py
deleted file mode 100644
index d878278475fb24cf6b97d66d784e657567f5aa80..0000000000000000000000000000000000000000
--- a/spaces/HarryLee/eCommerceImageCaptioning/fairseq/examples/speech_text_joint_to_text/tasks/__init__.py
+++ /dev/null
@@ -1,12 +0,0 @@
-# Copyright (c) Facebook, Inc. and its affiliates.
-#
-# This source code is licensed under the MIT license found in the
-# LICENSE file in the root directory of this source tree.
-
-import importlib
-import os
-
-for file in os.listdir(os.path.dirname(__file__)):
- if file.endswith(".py") and not file.startswith("_"):
- task_name = file[: file.find(".py")]
- importlib.import_module("examples.speech_text_joint_to_text.tasks." + task_name)
diff --git a/spaces/HarryLee/eCommerceImageCaptioning/fairseq/tests/distributed/test_distributed_timeout_wrapper.py b/spaces/HarryLee/eCommerceImageCaptioning/fairseq/tests/distributed/test_distributed_timeout_wrapper.py
deleted file mode 100644
index 27908b9d3f7d6d880351e2a12effb12f9bc27971..0000000000000000000000000000000000000000
--- a/spaces/HarryLee/eCommerceImageCaptioning/fairseq/tests/distributed/test_distributed_timeout_wrapper.py
+++ /dev/null
@@ -1,54 +0,0 @@
-# Copyright (c) Facebook, Inc. and its affiliates.
-#
-# This source code is licensed under the MIT license found in the
-# LICENSE file in the root directory of this source tree.
-
-import logging
-import signal
-import time
-import unittest
-
-import torch
-from torch import nn
-
-from fairseq.distributed import DistributedTimeoutWrapper
-
-
-class ModuleWithDelay(nn.Module):
-
- def __init__(self, delay):
- super().__init__()
- self.delay = delay
-
- def forward(self, x):
- time.sleep(self.delay)
- return x
-
-
-class TestDistributedTimeoutWrapper(unittest.TestCase):
-
- def setUp(self):
- logging.disable(logging.CRITICAL)
-
- def tearDown(self):
- logging.disable(logging.NOTSET)
-
- def test_no_timeout(self):
- module = DistributedTimeoutWrapper(ModuleWithDelay(1), 0, signal.SIGINT)
- module(torch.rand(5))
- module.stop_timeout()
-
- def test_timeout_safe(self):
- module = DistributedTimeoutWrapper(ModuleWithDelay(1), 10, signal.SIGINT)
- module(torch.rand(5))
- module.stop_timeout()
-
- def test_timeout_killed(self):
- with self.assertRaises(KeyboardInterrupt):
- module = DistributedTimeoutWrapper(ModuleWithDelay(5), 1, signal.SIGINT)
- module(torch.rand(5))
- module.stop_timeout()
-
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/spaces/Harveenchadha/en_to_indic_translation/indic_nlp_library/indicnlp/tokenize/indic_detokenize.py b/spaces/Harveenchadha/en_to_indic_translation/indic_nlp_library/indicnlp/tokenize/indic_detokenize.py
deleted file mode 100644
index 71fa2ace3c9cd851021e66c01a34e1c99338d294..0000000000000000000000000000000000000000
--- a/spaces/Harveenchadha/en_to_indic_translation/indic_nlp_library/indicnlp/tokenize/indic_detokenize.py
+++ /dev/null
@@ -1,134 +0,0 @@
-#
-# Copyright (c) 2013-present, Anoop Kunchukuttan
-# All rights reserved.
-#
-# This source code is licensed under the MIT license found in the
-# LICENSE file in the root directory of this source tree.
-#
-
-#Program for detokenizing Indian language input
-#
-# @author Anoop Kunchukuttan
-#
-"""
-De-tokenizer for Indian languages.
-"""
-
-import string, re, sys
-from indicnlp.common import IndicNlpException
-
-## detokenizer patterns
-left_attach=r'!%)\]},.:;>?\u0964\u0965'
-pat_la=re.compile(r'[ ](['+left_attach+r'])')
-
-right_attach=r'#$(\[{<@'
-pat_ra=re.compile(r'(['+right_attach+r'])[ ]')
-
-lr_attach=r'-/\\'
-pat_lra=re.compile(r'[ ](['+lr_attach+r'])[ ]')
-
-#donknow=u'&*+=^_|~'
-
-## date, numbers, section/article numbering
-## TODO: handle indic numbers
-pat_num_seq=re.compile(r'([0-9]+ [,.:/] )+[0-9]+')
-
-### e-mail address
-#pat_num=re.compile(ur'[a-zA-Z]+[ ]?
-
-def trivial_detokenize_indic(text):
- """detokenize string for Indian language scripts using Brahmi-derived scripts
-
- A trivial detokenizer which:
-
- - decides whether punctuation attaches to left/right or both
- - handles number sequences
- - handles quotes smartly (deciding left or right attachment)
-
- Args:
- text (str): tokenized text to process
-
- Returns:
- str: detokenized string
- """
-
- s=text
- ### some normalizations
-
- #numbers and dates
- new_s=''
- prev=0
- for m in pat_num_seq.finditer(s):
- start=m.start()
- end=m.end()
- if start>prev:
- new_s=new_s+s[prev:start]
- new_s=new_s+s[start:end].replace(' ','')
- prev=end
-
- new_s=new_s+s[prev:]
- s=new_s
-
- ### consective single quotes or backslashes become double quotes
- #s=s.replace("' '", "''")
- #s=s.replace("` `", '``')
-
- s=pat_lra.sub('\\1',s)
- s=pat_la.sub('\\1',s)
- s=pat_ra.sub('\\1',s)
-
- # assumes well formedness of quotes and alternates between right and left attach
-
- alt_attach='\'"`'
- for punc in alt_attach:
- cnt=0
- out_str=[]
- for c in s:
- if c == punc:
- if cnt%2==0:
- out_str.append('@RA')
- else:
- out_str.append('@LA')
- cnt+=1
- else:
- out_str.append(c)
-
- s=''.join(out_str).replace('@RA ',punc).replace(' @LA',punc
- ).replace('@RA',punc).replace('@LA',punc)
-
- return s
-
-def trivial_detokenize(text,lang='hi'):
- """detokenize string for languages of the Indian subcontinent
-
- A trivial detokenizer which:
-
- - decides whether punctuation attaches to left/right or both
- - handles number sequences
- - handles quotes smartly (deciding left or right attachment)
-
- Args:
- text (str): tokenized text to process
-
- Returns:
- str: detokenized string
-
- Raises:
- IndicNlpException: If language is not supported
- """
- if lang=='ur':
- raise IndicNlpException('No detokenizer available for Urdu')
- else:
- return trivial_detokenize_indic(text)
-
-# if __name__ == '__main__':
-
-# if len(sys.argv)<4:
-# print("Usage: python indic_detokenize.py ")
-# sys.exit(1)
-
-# with open(sys.argv[1],'r', encoding='utf-8') as ifile:
-# with open(sys.argv[2],'w', encoding='utf-8') as ofile:
-# for line in ifile:
-# detokenized_line=trivial_detokenize(line,sys.argv[3])
-# ofile.write(detokenized_line)
diff --git a/spaces/Harveenchadha/oiTrans/subword-nmt/subword_nmt/apply_bpe.py b/spaces/Harveenchadha/oiTrans/subword-nmt/subword_nmt/apply_bpe.py
deleted file mode 100644
index 25996c808d02643c45d0ee0a837b5b291f8aa4f8..0000000000000000000000000000000000000000
--- a/spaces/Harveenchadha/oiTrans/subword-nmt/subword_nmt/apply_bpe.py
+++ /dev/null
@@ -1,448 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-# Author: Rico Sennrich
-
-"""Use operations learned with learn_bpe.py to encode a new text.
-The text will not be smaller, but use only a fixed vocabulary, with rare words
-encoded as variable-length sequences of subword units.
-
-Reference:
-Rico Sennrich, Barry Haddow and Alexandra Birch (2015). Neural Machine Translation of Rare Words with Subword Units.
-Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (ACL 2016). Berlin, Germany.
-"""
-
-from __future__ import unicode_literals, division
-
-import sys
-import os
-import inspect
-import codecs
-import io
-import argparse
-import re
-import warnings
-import random
-import tempfile
-from multiprocessing import Pool, cpu_count
-
-# hack for python2/3 compatibility
-from io import open
-argparse.open = open
-
-class BPE(object):
-
- def __init__(self, codes, merges=-1, separator='@@', vocab=None, glossaries=None):
-
- codes.seek(0)
- offset=1
-
- # check version information
- firstline = codes.readline()
- if firstline.startswith('#version:'):
- self.version = tuple([int(x) for x in re.sub(r'(\.0+)*$','', firstline.split()[-1]).split(".")])
- offset += 1
- else:
- self.version = (0, 1)
- codes.seek(0)
-
- self.bpe_codes = [tuple(item.strip('\r\n ').split(' ')) for (n, item) in enumerate(codes.read().rstrip('\n').split('\n')) if (n < merges or merges == -1)]
-
- for i, item in enumerate(self.bpe_codes):
- if len(item) != 2:
- sys.stderr.write('Error: invalid line {0} in BPE codes file: {1}\n'.format(i+offset, ' '.join(item)))
- sys.stderr.write('The line should exist of exactly two subword units, separated by whitespace\n')
- sys.exit(1)
-
- # some hacking to deal with duplicates (only consider first instance)
- self.bpe_codes = dict([(code,i) for (i,code) in reversed(list(enumerate(self.bpe_codes)))])
-
- self.bpe_codes_reverse = dict([(pair[0] + pair[1], pair) for pair,i in self.bpe_codes.items()])
-
- self.separator = separator
-
- self.vocab = vocab
-
- self.glossaries = glossaries if glossaries else []
-
- self.glossaries_regex = re.compile('^({})$'.format('|'.join(glossaries))) if glossaries else None
-
- self.cache = {}
-
- def process_lines(self, filename, outfile, dropout=0, num_workers=1):
-
- if sys.version_info < (3, 0):
- print("Parallel mode is only supported in Python3.")
- sys.exit(1)
-
- if num_workers == 1:
- _process_lines(self, filename, outfile, dropout, 0, 0)
- elif num_workers > 1:
- with open(filename, encoding="utf-8") as f:
- size = os.fstat(f.fileno()).st_size
- chunk_size = int(size / num_workers)
- offsets = [0 for _ in range(num_workers + 1)]
- for i in range(1, num_workers):
- f.seek(chunk_size * i)
- pos = f.tell()
- while True:
- try:
- line = f.readline()
- break
- except UnicodeDecodeError:
- pos -= 1
- f.seek(pos)
- offsets[i] = f.tell()
- assert 0 <= offsets[i] < 1e20, "Bad new line separator, e.g. '\\r'"
- res_files = []
- pool = Pool(processes=num_workers)
- for i in range(num_workers):
- tmp = tempfile.NamedTemporaryFile(delete=False)
- tmp.close()
- res_files.append(tmp)
- pool.apply_async(_process_lines, (self, filename, tmp.name, dropout, offsets[i], offsets[i + 1]))
- pool.close()
- pool.join()
- for i in range(num_workers):
- with open(res_files[i].name, encoding="utf-8") as fi:
- for line in fi:
- outfile.write(line)
- os.remove(res_files[i].name)
- else:
- raise ValueError('`num_workers` is expected to be a positive number, but got {}.'.format(num_workers))
-
- def process_line(self, line, dropout=0):
- """segment line, dealing with leading and trailing whitespace"""
-
- out = ""
-
- leading_whitespace = len(line)-len(line.lstrip('\r\n '))
- if leading_whitespace:
- out += line[:leading_whitespace]
-
- out += self.segment(line, dropout)
-
- trailing_whitespace = len(line)-len(line.rstrip('\r\n '))
- if trailing_whitespace and trailing_whitespace != len(line):
- out += line[-trailing_whitespace:]
-
- return out
-
- def segment(self, sentence, dropout=0):
- """segment single sentence (whitespace-tokenized string) with BPE encoding"""
- segments = self.segment_tokens(sentence.strip('\r\n ').split(' '), dropout)
- return ' '.join(segments)
-
- def segment_tokens(self, tokens, dropout=0):
- """segment a sequence of tokens with BPE encoding"""
- output = []
- for word in tokens:
- # eliminate double spaces
- if not word:
- continue
- new_word = [out for segment in self._isolate_glossaries(word)
- for out in encode(segment,
- self.bpe_codes,
- self.bpe_codes_reverse,
- self.vocab,
- self.separator,
- self.version,
- self.cache,
- self.glossaries_regex,
- dropout)]
-
- for item in new_word[:-1]:
- output.append(item + self.separator)
- output.append(new_word[-1])
-
- return output
-
- def _isolate_glossaries(self, word):
- word_segments = [word]
- for gloss in self.glossaries:
- word_segments = [out_segments for segment in word_segments
- for out_segments in isolate_glossary(segment, gloss)]
- return word_segments
-
-def _process_lines(bpe, filename, outfile, dropout, begin, end):
- if isinstance(outfile, str):
- fo = open(outfile, "w", encoding="utf-8")
- else:
- fo = outfile
- with open(filename, encoding="utf-8") as f:
- f.seek(begin)
- line = f.readline()
- while line:
- pos = f.tell()
- assert 0 <= pos < 1e20, "Bad new line separator, e.g. '\\r'"
- if end > 0 and pos > end:
- break
- fo.write(bpe.process_line(line, dropout))
- line = f.readline()
- if isinstance(outfile, str):
- fo.close()
-
-def create_parser(subparsers=None):
-
- if subparsers:
- parser = subparsers.add_parser('apply-bpe',
- formatter_class=argparse.RawDescriptionHelpFormatter,
- description="learn BPE-based word segmentation")
- else:
- parser = argparse.ArgumentParser(
- formatter_class=argparse.RawDescriptionHelpFormatter,
- description="learn BPE-based word segmentation")
-
- parser.add_argument(
- '--input', '-i', type=argparse.FileType('r'), default=sys.stdin,
- metavar='PATH',
- help="Input file (default: standard input).")
- parser.add_argument(
- '--codes', '-c', type=argparse.FileType('r'), metavar='PATH',
- required=True,
- help="File with BPE codes (created by learn_bpe.py).")
- parser.add_argument(
- '--merges', '-m', type=int, default=-1,
- metavar='INT',
- help="Use this many BPE operations (<= number of learned symbols)"+
- "default: Apply all the learned merge operations")
- parser.add_argument(
- '--output', '-o', type=argparse.FileType('w'), default=sys.stdout,
- metavar='PATH',
- help="Output file (default: standard output)")
- parser.add_argument(
- '--separator', '-s', type=str, default='@@', metavar='STR',
- help="Separator between non-final subword units (default: '%(default)s'))")
- parser.add_argument(
- '--vocabulary', type=argparse.FileType('r'), default=None,
- metavar="PATH",
- help="Vocabulary file (built with get_vocab.py). If provided, this script reverts any merge operations that produce an OOV.")
- parser.add_argument(
- '--vocabulary-threshold', type=int, default=None,
- metavar="INT",
- help="Vocabulary threshold. If vocabulary is provided, any word with frequency < threshold will be treated as OOV")
- parser.add_argument(
- '--dropout', type=float, default=0,
- metavar="P",
- help="Dropout BPE merge operations with probability P (Provilkov et al., 2019). Use this on training data only.")
- parser.add_argument(
- '--glossaries', type=str, nargs='+', default=None,
- metavar="STR",
- help="Glossaries. Words matching any of the words/regex provided in glossaries will not be affected "+
- "by the BPE (i.e. they will neither be broken into subwords, nor concatenated with other subwords. "+
- "Can be provided as a list of words/regex after the --glossaries argument. Enclose each regex in quotes.")
- parser.add_argument(
- '--seed', type=int, default=None,
- metavar="S",
- help="Random seed for the random number generators (e.g. for BPE dropout with --dropout).")
- parser.add_argument(
- '--num-workers', type=int, default=1,
- help="Number of processors to process texts, only supported in Python3. If -1, set `multiprocessing.cpu_count()`. (default: %(default)s)")
-
- return parser
-
-def encode(orig, bpe_codes, bpe_codes_reverse, vocab, separator, version, cache, glossaries_regex=None, dropout=0):
- """Encode word based on list of BPE merge operations, which are applied consecutively
- """
-
- if not dropout and orig in cache:
- return cache[orig]
-
- if glossaries_regex and glossaries_regex.match(orig):
- cache[orig] = (orig,)
- return (orig,)
-
- if len(orig) == 1:
- return orig
-
- if version == (0, 1):
- word = list(orig) + ['']
- elif version == (0, 2): # more consistent handling of word-final segments
- word = list(orig[:-1]) + [orig[-1] + '']
- else:
- raise NotImplementedError
-
- while len(word) > 1:
-
- # get list of symbol pairs; optionally apply dropout
- pairs = [(bpe_codes[pair],i,pair) for (i,pair) in enumerate(zip(word, word[1:])) if (not dropout or random.random() > dropout) and pair in bpe_codes]
-
- if not pairs:
- break
-
- #get first merge operation in list of BPE codes
- bigram = min(pairs)[2]
-
- # find start position of all pairs that we want to merge
- positions = [i for (rank,i,pair) in pairs if pair == bigram]
-
- i = 0
- new_word = []
- bigram = ''.join(bigram)
- for j in positions:
- # merges are invalid if they start before current position. This can happen if there are overlapping pairs: (x x x -> xx x)
- if j < i:
- continue
- new_word.extend(word[i:j]) # all symbols before merged pair
- new_word.append(bigram) # merged pair
- i = j+2 # continue after merged pair
- new_word.extend(word[i:]) # add all symbols until end of word
- word = new_word
-
- # don't print end-of-word symbols
- if word[-1] == '':
- word = word[:-1]
- elif word[-1].endswith(''):
- word[-1] = word[-1][:-4]
-
- word = tuple(word)
- if vocab:
- word = check_vocab_and_split(word, bpe_codes_reverse, vocab, separator)
-
- cache[orig] = word
- return word
-
-def recursive_split(segment, bpe_codes, vocab, separator, final=False):
- """Recursively split segment into smaller units (by reversing BPE merges)
- until all units are either in-vocabulary, or cannot be split futher."""
-
- try:
- if final:
- left, right = bpe_codes[segment + '']
- right = right[:-4]
- else:
- left, right = bpe_codes[segment]
- except:
- #sys.stderr.write('cannot split {0} further.\n'.format(segment))
- yield segment
- return
-
- if left + separator in vocab:
- yield left
- else:
- for item in recursive_split(left, bpe_codes, vocab, separator, False):
- yield item
-
- if (final and right in vocab) or (not final and right + separator in vocab):
- yield right
- else:
- for item in recursive_split(right, bpe_codes, vocab, separator, final):
- yield item
-
-def check_vocab_and_split(orig, bpe_codes, vocab, separator):
- """Check for each segment in word if it is in-vocabulary,
- and segment OOV segments into smaller units by reversing the BPE merge operations"""
-
- out = []
-
- for segment in orig[:-1]:
- if segment + separator in vocab:
- out.append(segment)
- else:
- #sys.stderr.write('OOV: {0}\n'.format(segment))
- for item in recursive_split(segment, bpe_codes, vocab, separator, False):
- out.append(item)
-
- segment = orig[-1]
- if segment in vocab:
- out.append(segment)
- else:
- #sys.stderr.write('OOV: {0}\n'.format(segment))
- for item in recursive_split(segment, bpe_codes, vocab, separator, True):
- out.append(item)
-
- return out
-
-
-def read_vocabulary(vocab_file, threshold):
- """read vocabulary file produced by get_vocab.py, and filter according to frequency threshold.
- """
-
- vocabulary = set()
-
- for line in vocab_file:
- word, freq = line.strip('\r\n ').split(' ')
- freq = int(freq)
- if threshold == None or freq >= threshold:
- vocabulary.add(word)
-
- return vocabulary
-
-def isolate_glossary(word, glossary):
- """
- Isolate a glossary present inside a word.
-
- Returns a list of subwords. In which all 'glossary' glossaries are isolated
-
- For example, if 'USA' is the glossary and '1934USABUSA' the word, the return value is:
- ['1934', 'USA', 'B', 'USA']
- """
- # regex equivalent of (if word == glossary or glossary not in word)
- if re.match('^'+glossary+'$', word) or not re.search(glossary, word):
- return [word]
- else:
- segments = re.split(r'({})'.format(glossary), word)
- segments, ending = segments[:-1], segments[-1]
- segments = list(filter(None, segments)) # Remove empty strings in regex group.
- return segments + [ending.strip('\r\n ')] if ending != '' else segments
-
-if __name__ == '__main__':
-
- currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
- newdir = os.path.join(currentdir, 'subword_nmt')
- if os.path.isdir(newdir):
- warnings.simplefilter('default')
- warnings.warn(
- "this script's location has moved to {0}. This symbolic link will be removed in a future version. Please point to the new location, or install the package and use the command 'subword-nmt'".format(newdir),
- DeprecationWarning
- )
-
- # python 2/3 compatibility
- if sys.version_info < (3, 0):
- sys.stderr = codecs.getwriter('UTF-8')(sys.stderr)
- sys.stdout = codecs.getwriter('UTF-8')(sys.stdout)
- sys.stdin = codecs.getreader('UTF-8')(sys.stdin)
- else:
- sys.stdin = io.TextIOWrapper(sys.stdin.buffer, encoding='utf-8')
- sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8')
- sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8', write_through=True, line_buffering=True)
-
- parser = create_parser()
- args = parser.parse_args()
-
- if args.num_workers <= 0:
- args.num_workers = cpu_count()
-
- # read/write files as UTF-8
- args.codes = codecs.open(args.codes.name, encoding='utf-8')
- if args.input.name != '':
- args.input = codecs.open(args.input.name, encoding='utf-8')
- if args.output.name != '':
- args.output = codecs.open(args.output.name, 'w', encoding='utf-8')
- if args.vocabulary:
- args.vocabulary = codecs.open(args.vocabulary.name, encoding='utf-8')
-
- if args.vocabulary:
- vocabulary = read_vocabulary(args.vocabulary, args.vocabulary_threshold)
- else:
- vocabulary = None
-
- if sys.version_info < (3, 0):
- args.separator = args.separator.decode('UTF-8')
- if args.glossaries:
- args.glossaries = [g.decode('UTF-8') for g in args.glossaries]
- if args.num_workers > 1:
- args.num_workers = 1
- warnings.warn("Parallel mode is only supported in Python3. Using 1 processor instead.")
-
- if args.seed is not None:
- random.seed(args.seed)
-
- bpe = BPE(args.codes, args.merges, args.separator, vocabulary, args.glossaries)
-
- if args.input.name == '' or args.num_workers == 1:
- if args.num_workers > 1:
- warnings.warn("In parallel mode, the input cannot be STDIN. Using 1 processor instead.")
- for line in args.input:
- args.output.write(bpe.process_line(line, args.dropout))
- else:
- bpe.process_lines(args.input.name, args.output, args.dropout, args.num_workers)
diff --git a/spaces/Hina4867/bingo/src/components/ui/icons.tsx b/spaces/Hina4867/bingo/src/components/ui/icons.tsx
deleted file mode 100644
index 0ca5bee838afedafae3eddbfe2612edba1586f9c..0000000000000000000000000000000000000000
--- a/spaces/Hina4867/bingo/src/components/ui/icons.tsx
+++ /dev/null
@@ -1,489 +0,0 @@
-'use client'
-
-import * as React from 'react'
-
-import { cn } from '@/lib/utils'
-
-function IconNextChat({
- className,
- inverted,
- ...props
-}: React.ComponentProps<'svg'> & { inverted?: boolean }) {
- const id = React.useId()
-
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- )
-}
-
-function IconOpenAI({ className, ...props }: React.ComponentProps<'svg'>) {
- return (
-
- OpenAI icon
-
-
- )
-}
-
-function IconGitHub({ className, ...props }: React.ComponentProps<'svg'>) {
- return (
-
- GitHub
-
-
- )
-}
-
-function IconSeparator({ className, ...props }: React.ComponentProps<'svg'>) {
- return (
-
-
-
- )
-}
-
-function IconArrowDown({ className, ...props }: React.ComponentProps<'svg'>) {
- return (
-
-
-
- )
-}
-
-function IconArrowRight({ className, ...props }: React.ComponentProps<'svg'>) {
- return (
-
-
-
- )
-}
-
-function IconUser({ className, ...props }: React.ComponentProps<'svg'>) {
- return (
-
-
-
- )
-}
-
-function IconPlus({ className, ...props }: React.ComponentProps<'svg'>) {
- return (
-
-
-
- )
-}
-
-function IconArrowElbow({ className, ...props }: React.ComponentProps<'svg'>) {
- return (
-
-
-
- )
-}
-
-function IconSpinner({ className, ...props }: React.ComponentProps<'svg'>) {
- return (
-
-
-
- )
-}
-
-function IconMessage({ className, ...props }: React.ComponentProps<'svg'>) {
- return (
-
-
-
- )
-}
-
-function IconTrash({ className, ...props }: React.ComponentProps<'svg'>) {
- return (
-
-
-
- )
-}
-
-function IconRefresh({ className, ...props }: React.ComponentProps<'svg'>) {
- return (
-
-
-
- )
-}
-
-function IconStop({ className, ...props }: React.ComponentProps<'svg'>) {
- return (
-
-
-
- )
-}
-
-function IconSidebar({ className, ...props }: React.ComponentProps<'svg'>) {
- return (
-
-
-
- )
-}
-
-function IconMoon({ className, ...props }: React.ComponentProps<'svg'>) {
- return (
-
-
-
- )
-}
-
-function IconSun({ className, ...props }: React.ComponentProps<'svg'>) {
- return (
-
-
-
- )
-}
-
-function IconCopy({ className, ...props }: React.ComponentProps<'svg'>) {
- return (
-
-
-
- )
-}
-
-function IconCheck({ className, ...props }: React.ComponentProps<'svg'>) {
- return (
-
-
-
- )
-}
-
-function IconDownload({ className, ...props }: React.ComponentProps<'svg'>) {
- return (
-
-
-
- )
-}
-
-function IconClose({ className, ...props }: React.ComponentProps<'svg'>) {
- return (
-
-
-
- )
-}
-
-function IconEdit({ className, ...props }: React.ComponentProps<'svg'>) {
- return (
-
-
-
- )
-}
-
-function IconShare({ className, ...props }: React.ComponentProps<'svg'>) {
- return (
-
-
-
- )
-}
-
-function IconUsers({ className, ...props }: React.ComponentProps<'svg'>) {
- return (
-
-
-
- )
-}
-
-function IconExternalLink({
- className,
- ...props
-}: React.ComponentProps<'svg'>) {
- return (
-
-
-
- )
-}
-
-function IconChevronUpDown({
- className,
- ...props
-}: React.ComponentProps<'svg'>) {
- return (
-
-
-
- )
-}
-
-export {
- IconEdit,
- IconNextChat,
- IconOpenAI,
- IconGitHub,
- IconSeparator,
- IconArrowDown,
- IconArrowRight,
- IconUser,
- IconPlus,
- IconArrowElbow,
- IconSpinner,
- IconMessage,
- IconTrash,
- IconRefresh,
- IconStop,
- IconSidebar,
- IconMoon,
- IconSun,
- IconCopy,
- IconCheck,
- IconDownload,
- IconClose,
- IconShare,
- IconUsers,
- IconExternalLink,
- IconChevronUpDown
-}
diff --git a/spaces/HuggingFaceM4/IDEFICS_Data_Measurement_Tool/data_measurements/lengths/__init__.py b/spaces/HuggingFaceM4/IDEFICS_Data_Measurement_Tool/data_measurements/lengths/__init__.py
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/spaces/HuggingFaceM4/IDEFICS_Data_Measurement_Tool/text_to_image/app.py b/spaces/HuggingFaceM4/IDEFICS_Data_Measurement_Tool/text_to_image/app.py
deleted file mode 100644
index 5bf5fee1c31a01b3ccd932b5259c1e1c7a6e882b..0000000000000000000000000000000000000000
--- a/spaces/HuggingFaceM4/IDEFICS_Data_Measurement_Tool/text_to_image/app.py
+++ /dev/null
@@ -1,157 +0,0 @@
-import gradio as gr
-import os
-import random
-import time
-from zipfile import ZipFile
-import tempfile
-import string
-import time
-
-
-
-import argparse
-import ast
-import gradio as gr
-from os.path import isdir
-#from data_measurements.dataset_statistics import DatasetStatisticsCacheClass as dmt_cls
-import utils
-from utils import dataset_utils
-from utils import gradio_utils as gr_utils
-import widgets
-import app as ap
-from app import load_or_prepare_widgets
-
-
-logs = utils.prepare_logging(__file__)
-
-# Utility for sidebar description and selection of the dataset
-DATASET_NAME_TO_DICT = dataset_utils.get_dataset_info_dicts()
-
-directory = tempfile.mkdtemp(dir="./")
-
-imagens = []
-
-model = gr.Interface.load(
- "models/dreamlike-art/dreamlike-photoreal-2.0",
-)
-
-#o = os.getenv("P")
-o = "V"
-
-m_out = ("""
-
-
Loading Time Limit Reached.
-Please choose a Simpler Prompt, or Upgrade for faster loading.
-
-""")
-loading=("""
-""")
-
-def add_random_noise(prompt, noise_level=1.00):
- if noise_level == 0:
- noise_level = 0.00
- if noise_level == None:
- noise_level = 1.00
- percentage_noise = noise_level * 5
- num_noise_chars = int(len(prompt) * (percentage_noise/100))
- noise_indices = random.sample(range(len(prompt)), num_noise_chars)
- prompt_list = list(prompt)
- noise_chars = list(string.ascii_letters + string.punctuation + ' ' + string.digits)
- noise_chars.extend(['😍', '💩', '😂', '🤔', '😊', '🤗', '😭', '🙄', '😷', '🤯', '🤫', '🥴', '😴', '🤩', '🥳', '😔', '😩', '🤪', '😇', '🤢', '😈', '👹', '👻', '🤖', '👽', '💀', '🎃', '🎅', '🎄', '🎁', '🎂', '🎉', '🎈', '🎊', '🎮', '❤️', '💔', '💕', '💖', '💗', '🐶', '🐱', '🐭', '🐹', '🦊', '🐻', '🐨', '🐯', '🦁', '🐘', '🔥', '🌧️', '🌞', '🌈', '💥', '🌴', '🌊', '🌺', '🌻', '🌸', '🎨', '🌅', '🌌', '☁️', '⛈️', '❄️', '☀️', '🌤️', '⛅️', '🌥️', '🌦️', '🌧️', '🌩️', '🌨️', '🌫️', '☔️', '🌬️', '💨', '🌪️', '🌈'])
- for index in noise_indices:
- prompt_list[index] = random.choice(noise_chars)
- return "".join(prompt_list)
-
-def build():
- def zip_files():
- zip_name = f"{b.prompt.split(' ')[0]}_{random.randint(0, 10000)}.zip"
- with ZipFile(zip_name, "w") as zipObj:
- for file in b.imagens:
- zipObj.write(file, os.path.basename(file))
- b.imagens = []
- return zip_name
- def clear():
- return gr.update(value=0),gr.update(value=0)
- def start():
- stamp = time.time()
- return gr.update(value=stamp),gr.update(value=0)
- def end(stamp):
- ts = stamp + 360
- ti = time.time()
- if ti > ts and stamp != 0:
- return gr.update(value=1),gr.HTML.update(f"{m_out}",visible=True)
- else:
- return gr.update(value=0),None
- def im_fn(prompt,noise_level,h=None):
- try:
- if h == o:
- prompt_with_noise = add_random_noise(prompt, noise_level)
- imagem = model(prompt_with_noise)
- b.prompt = prompt
- b.imagens.append(imagem)
- return imagem
- elif h != o:
- return(None,None)
- except Exception as E:
- return None, None
- def cl_fac():
- return "",gr.HTML.update(f"{loading}")
- with gr.Blocks() as b:
- b.imagens: list = []
- with gr.Row():
- with gr.Column():
- prompt = gr.Textbox(label="Prompt", placeholder="Enter a prompt")
- noise_level = gr.Slider(minimum=0.0, maximum=10, step=0.1, label="Noise Level between images.")
- with gr.Column():
- with gr.Row():
- btn1 = gr.Button("Generate")
- btn2 = gr.Button("Clear")
- message=gr.HTML("
")
- message2=gr.HTML("",visible=False)
-
- with gr.Row():
- out1 = gr.Image()
- out2 = gr.Image()
- with gr.Row():
- out3 = gr.Image()
- out4 = gr.Image()
- with gr.Row():
- out5 = gr.Image()
- out6 = gr.Image()
- with gr.Row():
- # btn3 = gr.Button("Download")
- caixa = gr.File(file_count="multiple", file_types=["text", ".json", ".csv", "image"])
-
- with gr.Row(visible=False):
- h_variavel=gr.Textbox(value="V")
- t_state=gr.Number()
- t_switch=gr.Textbox(value=0)
- auto= gr.Image()
- def clear_all():
- return "",None,None,None,None,None,None,None,None,1,gr.HTML.update("
")
- fac_b = gr.Textbox(value="",visible=False)
-
- def noth():
- return gr.HTML.update("
")
- #a1=btn1.click(noth,None,btn1,every=1)
- btn1.click(cl_fac,None,[fac_b,message],show_progress=False)
- b1=btn1.click(start,None,[t_state,t_switch],show_progress=True)
- sta = t_state.change(end,t_state,[t_switch,message2],every=1,show_progress=True)
- b2=btn1.click(im_fn,[prompt,noise_level,h_variavel],[out1,], show_progress=True)
- b3=out1.change(im_fn,[prompt,noise_level,h_variavel],[out2,], show_progress=True)
- b4=out2.change(im_fn,[prompt,noise_level,h_variavel],[out3,], show_progress=True)
- b5=out3.change(im_fn,[prompt,noise_level,h_variavel],[out4,], show_progress=True)
- b6=out4.change(im_fn,[prompt,noise_level,h_variavel],[out5,], show_progress=True)
- b7=out5.change(im_fn,[prompt,noise_level,h_variavel],[out6], show_progress=True)
- b8=out6.change(noth,None,[message], show_progress=False)
- b8=out6.change(zip_files,None,[caixa], show_progress=False)
- swi=t_switch.change(clear,None,[t_switch,fac_b], cancels=[sta,b2,b3,b4,b5,b6,b7],show_progress=False)
- #btn2.click(noth,None,message,cancels=[b1,sta,b2,b3,b4,b5,swi],show_progress=False)
- btn2.click(clear_all, None,[fac_b,prompt,out1,out2,out3,out4,out5,out6,t_state,t_switch,message],cancels=[b1,sta,b2,b3,b4,b5,b6,b7,b8,swi],show_progress=False)
- # btn3.click(zip_files,None,[caixa],show_progress=False)
- # caixa.change(noth,None,[message],show_progress=False)
- b.queue(concurrency_count=100).launch(show_api=False)
-build()
-
-
-## check that it works with a text prompt as variables parsed into build()
\ No newline at end of file
diff --git a/spaces/ICML2022/OFA/fairseq/fairseq/clib/libbleu/libbleu.cpp b/spaces/ICML2022/OFA/fairseq/fairseq/clib/libbleu/libbleu.cpp
deleted file mode 100644
index 939d9e1174e398fa48c840009b592c753a67939a..0000000000000000000000000000000000000000
--- a/spaces/ICML2022/OFA/fairseq/fairseq/clib/libbleu/libbleu.cpp
+++ /dev/null
@@ -1,157 +0,0 @@
-/**
- * Copyright 2017-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-#include
-#include
-#include
-#include
-
-// NOLINTNEXTLINE
-typedef struct {
- size_t reflen;
- size_t predlen;
- size_t match1;
- size_t count1;
- size_t match2;
- size_t count2;
- size_t match3;
- size_t count3;
- size_t match4;
- size_t count4;
-} bleu_stat;
-
-// left trim (remove pad)
-void bleu_ltrim(size_t* len, int** sent, int pad) {
- size_t start = 0;
- while (start < *len) {
- if (*(*sent + start) != pad) {
- break;
- }
- start++;
- }
- *sent += start;
- *len -= start;
-}
-
-// right trim remove (eos)
-void bleu_rtrim(size_t* len, int** sent, int pad, int eos) {
- size_t end = *len - 1;
- while (end > 0) {
- if (*(*sent + end) != eos && *(*sent + end) != pad) {
- break;
- }
- end--;
- }
- *len = end + 1;
-}
-
-// left and right trim
-void bleu_trim(size_t* len, int** sent, int pad, int eos) {
- bleu_ltrim(len, sent, pad);
- bleu_rtrim(len, sent, pad, eos);
-}
-
-size_t bleu_hash(int len, int* data) {
- size_t h = 14695981039346656037ul;
- size_t prime = 0x100000001b3;
- char* b = (char*)data;
- size_t blen = sizeof(int) * len;
-
- while (blen-- > 0) {
- h ^= *b++;
- h *= prime;
- }
-
- return h;
-}
-
-void bleu_addngram(
- size_t* ntotal,
- size_t* nmatch,
- size_t n,
- size_t reflen,
- int* ref,
- size_t predlen,
- int* pred) {
- if (predlen < n) {
- return;
- }
-
- predlen = predlen - n + 1;
- (*ntotal) += predlen;
-
- if (reflen < n) {
- return;
- }
-
- reflen = reflen - n + 1;
-
- std::map count;
- while (predlen > 0) {
- size_t w = bleu_hash(n, pred++);
- count[w]++;
- predlen--;
- }
-
- while (reflen > 0) {
- size_t w = bleu_hash(n, ref++);
- if (count[w] > 0) {
- (*nmatch)++;
- count[w] -= 1;
- }
- reflen--;
- }
-}
-
-extern "C" {
-
-#ifdef _WIN64
-__declspec(dllexport)
-#endif
- void bleu_zero_init(bleu_stat* stat) {
- std::memset(stat, 0, sizeof(bleu_stat));
-}
-
-#ifdef _WIN64
-__declspec(dllexport)
-#endif
- void bleu_one_init(bleu_stat* stat) {
- bleu_zero_init(stat);
- stat->count1 = 0;
- stat->count2 = 1;
- stat->count3 = 1;
- stat->count4 = 1;
- stat->match1 = 0;
- stat->match2 = 1;
- stat->match3 = 1;
- stat->match4 = 1;
-}
-
-#ifdef _WIN64
-__declspec(dllexport)
-#endif
- void bleu_add(
- bleu_stat* stat,
- size_t reflen,
- int* ref,
- size_t predlen,
- int* pred,
- int pad,
- int eos) {
-
- bleu_trim(&reflen, &ref, pad, eos);
- bleu_trim(&predlen, &pred, pad, eos);
- stat->reflen += reflen;
- stat->predlen += predlen;
-
- bleu_addngram(&stat->count1, &stat->match1, 1, reflen, ref, predlen, pred);
- bleu_addngram(&stat->count2, &stat->match2, 2, reflen, ref, predlen, pred);
- bleu_addngram(&stat->count3, &stat->match3, 3, reflen, ref, predlen, pred);
- bleu_addngram(&stat->count4, &stat->match4, 4, reflen, ref, predlen, pred);
-}
-}
diff --git a/spaces/ICML2022/OFA/fairseq/fairseq/optim/fused_lamb.py b/spaces/ICML2022/OFA/fairseq/fairseq/optim/fused_lamb.py
deleted file mode 100644
index f4f2bdb0c6c65f7758509b6d4d2f2c48cb6e8b4f..0000000000000000000000000000000000000000
--- a/spaces/ICML2022/OFA/fairseq/fairseq/optim/fused_lamb.py
+++ /dev/null
@@ -1,51 +0,0 @@
-# Copyright (c) Facebook, Inc. and its affiliates.
-#
-# This source code is licensed under the MIT license found in the
-# LICENSE file in the root directory of this source tree.
-
-from fairseq.optim import LegacyFairseqOptimizer, register_optimizer
-
-
-@register_optimizer("lamb")
-class FairseqLAMB(LegacyFairseqOptimizer):
- """LAMB optimizer."""
-
- def __init__(self, args, params):
- super().__init__(args)
- try:
- from apex.optimizers import FusedLAMB
-
- self._optimizer = FusedLAMB(params, **self.optimizer_config)
- except ImportError:
- raise ImportError("Please install apex to use LAMB optimizer")
-
- @staticmethod
- def add_args(parser):
- """Add optimizer-specific arguments to the parser."""
- # fmt: off
- parser.add_argument('--lamb-betas', default='(0.9, 0.999)', metavar='B',
- help='betas for LAMB optimizer')
- parser.add_argument('--lamb-eps', type=float, default=1e-8, metavar='D',
- help='epsilon for LAMB optimizer')
- parser.add_argument('--weight-decay', '--wd', default=0.0, type=float, metavar='WD',
- help='weight decay')
- # fmt: on
-
- @property
- def optimizer_config(self):
- """
- Return a kwarg dictionary that will be used to override optimizer
- args stored in checkpoints. This allows us to load a checkpoint and
- resume training using a different set of optimizer args, e.g., with a
- different learning rate.
- """
- return {
- "lr": self.args.lr[0],
- "betas": eval(self.args.lamb_betas),
- "eps": self.args.lamb_eps,
- "weight_decay": self.args.weight_decay,
- }
-
- @property
- def supports_flat_params(self):
- return False
diff --git a/spaces/ICML2022/resefa/third_party/stylegan3_official_ops/upfirdn2d.cpp b/spaces/ICML2022/resefa/third_party/stylegan3_official_ops/upfirdn2d.cpp
deleted file mode 100644
index 44fa337d8d4c34dfa010a59cd27d86857db671aa..0000000000000000000000000000000000000000
--- a/spaces/ICML2022/resefa/third_party/stylegan3_official_ops/upfirdn2d.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
-//
-// NVIDIA CORPORATION and its licensors retain all intellectual property
-// and proprietary rights in and to this software, related documentation
-// and any modifications thereto. Any use, reproduction, disclosure or
-// distribution of this software and related documentation without an express
-// license agreement from NVIDIA CORPORATION is strictly prohibited.
-
-#include
-#include
-#include
-#include "upfirdn2d.h"
-
-//------------------------------------------------------------------------
-
-static torch::Tensor upfirdn2d(torch::Tensor x, torch::Tensor f, int upx, int upy, int downx, int downy, int padx0, int padx1, int pady0, int pady1, bool flip, float gain)
-{
- // Validate arguments.
- TORCH_CHECK(x.is_cuda(), "x must reside on CUDA device");
- TORCH_CHECK(f.device() == x.device(), "f must reside on the same device as x");
- TORCH_CHECK(f.dtype() == torch::kFloat, "f must be float32");
- TORCH_CHECK(x.numel() <= INT_MAX, "x is too large");
- TORCH_CHECK(f.numel() <= INT_MAX, "f is too large");
- TORCH_CHECK(x.numel() > 0, "x has zero size");
- TORCH_CHECK(f.numel() > 0, "f has zero size");
- TORCH_CHECK(x.dim() == 4, "x must be rank 4");
- TORCH_CHECK(f.dim() == 2, "f must be rank 2");
- TORCH_CHECK((x.size(0)-1)*x.stride(0) + (x.size(1)-1)*x.stride(1) + (x.size(2)-1)*x.stride(2) + (x.size(3)-1)*x.stride(3) <= INT_MAX, "x memory footprint is too large");
- TORCH_CHECK(f.size(0) >= 1 && f.size(1) >= 1, "f must be at least 1x1");
- TORCH_CHECK(upx >= 1 && upy >= 1, "upsampling factor must be at least 1");
- TORCH_CHECK(downx >= 1 && downy >= 1, "downsampling factor must be at least 1");
-
- // Create output tensor.
- const at::cuda::OptionalCUDAGuard device_guard(device_of(x));
- int outW = ((int)x.size(3) * upx + padx0 + padx1 - (int)f.size(1) + downx) / downx;
- int outH = ((int)x.size(2) * upy + pady0 + pady1 - (int)f.size(0) + downy) / downy;
- TORCH_CHECK(outW >= 1 && outH >= 1, "output must be at least 1x1");
- torch::Tensor y = torch::empty({x.size(0), x.size(1), outH, outW}, x.options(), x.suggest_memory_format());
- TORCH_CHECK(y.numel() <= INT_MAX, "output is too large");
- TORCH_CHECK((y.size(0)-1)*y.stride(0) + (y.size(1)-1)*y.stride(1) + (y.size(2)-1)*y.stride(2) + (y.size(3)-1)*y.stride(3) <= INT_MAX, "output memory footprint is too large");
-
- // Initialize CUDA kernel parameters.
- upfirdn2d_kernel_params p;
- p.x = x.data_ptr();
- p.f = f.data_ptr();
- p.y = y.data_ptr();
- p.up = make_int2(upx, upy);
- p.down = make_int2(downx, downy);
- p.pad0 = make_int2(padx0, pady0);
- p.flip = (flip) ? 1 : 0;
- p.gain = gain;
- p.inSize = make_int4((int)x.size(3), (int)x.size(2), (int)x.size(1), (int)x.size(0));
- p.inStride = make_int4((int)x.stride(3), (int)x.stride(2), (int)x.stride(1), (int)x.stride(0));
- p.filterSize = make_int2((int)f.size(1), (int)f.size(0));
- p.filterStride = make_int2((int)f.stride(1), (int)f.stride(0));
- p.outSize = make_int4((int)y.size(3), (int)y.size(2), (int)y.size(1), (int)y.size(0));
- p.outStride = make_int4((int)y.stride(3), (int)y.stride(2), (int)y.stride(1), (int)y.stride(0));
- p.sizeMajor = (p.inStride.z == 1) ? p.inSize.w : p.inSize.w * p.inSize.z;
- p.sizeMinor = (p.inStride.z == 1) ? p.inSize.z : 1;
-
- // Choose CUDA kernel.
- upfirdn2d_kernel_spec spec;
- AT_DISPATCH_FLOATING_TYPES_AND_HALF(x.scalar_type(), "upfirdn2d_cuda", [&]
- {
- spec = choose_upfirdn2d_kernel(p);
- });
-
- // Set looping options.
- p.loopMajor = (p.sizeMajor - 1) / 16384 + 1;
- p.loopMinor = spec.loopMinor;
- p.loopX = spec.loopX;
- p.launchMinor = (p.sizeMinor - 1) / p.loopMinor + 1;
- p.launchMajor = (p.sizeMajor - 1) / p.loopMajor + 1;
-
- // Compute grid size.
- dim3 blockSize, gridSize;
- if (spec.tileOutW < 0) // large
- {
- blockSize = dim3(4, 32, 1);
- gridSize = dim3(
- ((p.outSize.y - 1) / blockSize.x + 1) * p.launchMinor,
- (p.outSize.x - 1) / (blockSize.y * p.loopX) + 1,
- p.launchMajor);
- }
- else // small
- {
- blockSize = dim3(256, 1, 1);
- gridSize = dim3(
- ((p.outSize.y - 1) / spec.tileOutH + 1) * p.launchMinor,
- (p.outSize.x - 1) / (spec.tileOutW * p.loopX) + 1,
- p.launchMajor);
- }
-
- // Launch CUDA kernel.
- void* args[] = {&p};
- AT_CUDA_CHECK(cudaLaunchKernel(spec.kernel, gridSize, blockSize, args, 0, at::cuda::getCurrentCUDAStream()));
- return y;
-}
-
-//------------------------------------------------------------------------
-
-PYBIND11_MODULE(TORCH_EXTENSION_NAME, m)
-{
- m.def("upfirdn2d", &upfirdn2d);
-}
-
-//------------------------------------------------------------------------
diff --git a/spaces/Iceclear/StableSR/StableSR/taming/modules/misc/coord.py b/spaces/Iceclear/StableSR/StableSR/taming/modules/misc/coord.py
deleted file mode 100644
index ee69b0c897b6b382ae673622e420f55e494f5b09..0000000000000000000000000000000000000000
--- a/spaces/Iceclear/StableSR/StableSR/taming/modules/misc/coord.py
+++ /dev/null
@@ -1,31 +0,0 @@
-import torch
-
-class CoordStage(object):
- def __init__(self, n_embed, down_factor):
- self.n_embed = n_embed
- self.down_factor = down_factor
-
- def eval(self):
- return self
-
- def encode(self, c):
- """fake vqmodel interface"""
- assert 0.0 <= c.min() and c.max() <= 1.0
- b,ch,h,w = c.shape
- assert ch == 1
-
- c = torch.nn.functional.interpolate(c, scale_factor=1/self.down_factor,
- mode="area")
- c = c.clamp(0.0, 1.0)
- c = self.n_embed*c
- c_quant = c.round()
- c_ind = c_quant.to(dtype=torch.long)
-
- info = None, None, c_ind
- return c_quant, None, info
-
- def decode(self, c):
- c = c/self.n_embed
- c = torch.nn.functional.interpolate(c, scale_factor=self.down_factor,
- mode="nearest")
- return c
diff --git a/spaces/Illumotion/Koboldcpp/include/CL/Utils/OpenCLUtils_Export.h b/spaces/Illumotion/Koboldcpp/include/CL/Utils/OpenCLUtils_Export.h
deleted file mode 100644
index 2db857ec07bd10f8b72631d09440e98170bad9a4..0000000000000000000000000000000000000000
--- a/spaces/Illumotion/Koboldcpp/include/CL/Utils/OpenCLUtils_Export.h
+++ /dev/null
@@ -1,42 +0,0 @@
-
-#ifndef UTILS_EXPORT_H
-#define UTILS_EXPORT_H
-
-#ifdef OPENCLUTILS_STATIC_DEFINE
-# define UTILS_EXPORT
-# define OPENCLUTILS_NO_EXPORT
-#else
-# ifndef UTILS_EXPORT
-# ifdef OpenCLUtils_EXPORTS
- /* We are building this library */
-# define UTILS_EXPORT
-# else
- /* We are using this library */
-# define UTILS_EXPORT
-# endif
-# endif
-
-# ifndef OPENCLUTILS_NO_EXPORT
-# define OPENCLUTILS_NO_EXPORT
-# endif
-#endif
-
-#ifndef OPENCLUTILS_DEPRECATED
-# define OPENCLUTILS_DEPRECATED __declspec(deprecated)
-#endif
-
-#ifndef OPENCLUTILS_DEPRECATED_EXPORT
-# define OPENCLUTILS_DEPRECATED_EXPORT UTILS_EXPORT OPENCLUTILS_DEPRECATED
-#endif
-
-#ifndef OPENCLUTILS_DEPRECATED_NO_EXPORT
-# define OPENCLUTILS_DEPRECATED_NO_EXPORT OPENCLUTILS_NO_EXPORT OPENCLUTILS_DEPRECATED
-#endif
-
-#if 0 /* DEFINE_NO_DEPRECATED */
-# ifndef OPENCLUTILS_NO_DEPRECATED
-# define OPENCLUTILS_NO_DEPRECATED
-# endif
-#endif
-
-#endif /* UTILS_EXPORT_H */
diff --git a/spaces/IndicNLP/Demo/README.md b/spaces/IndicNLP/Demo/README.md
deleted file mode 100644
index aa03692adc825192c51624fd94f3c8b79817e83b..0000000000000000000000000000000000000000
--- a/spaces/IndicNLP/Demo/README.md
+++ /dev/null
@@ -1,37 +0,0 @@
----
-title: Demo
-emoji: 💻
-colorFrom: purple
-colorTo: green
-sdk: streamlit
-app_file: app.py
-pinned: false
----
-
-# Configuration
-
-`title`: _string_
-Display title for the Space
-
-`emoji`: _string_
-Space emoji (emoji-only character allowed)
-
-`colorFrom`: _string_
-Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray)
-
-`colorTo`: _string_
-Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray)
-
-`sdk`: _string_
-Can be either `gradio` or `streamlit`
-
-`sdk_version` : _string_
-Only applicable for `streamlit` SDK.
-See [doc](https://hf.co/docs/hub/spaces) for more info on supported versions.
-
-`app_file`: _string_
-Path to your main application file (which contains either `gradio` or `streamlit` Python code).
-Path is relative to the root of the repository.
-
-`pinned`: _boolean_
-Whether the Space stays on top of your list.
diff --git a/spaces/InpaintAI/Inpaint-Anything/third_party/segment-anything/scripts/export_onnx_model.py b/spaces/InpaintAI/Inpaint-Anything/third_party/segment-anything/scripts/export_onnx_model.py
deleted file mode 100644
index 5c6f8389ea96fc871e4a0ff36a30fa7b9fcf4c90..0000000000000000000000000000000000000000
--- a/spaces/InpaintAI/Inpaint-Anything/third_party/segment-anything/scripts/export_onnx_model.py
+++ /dev/null
@@ -1,201 +0,0 @@
-# Copyright (c) Meta Platforms, Inc. and affiliates.
-# All rights reserved.
-
-# This source code is licensed under the license found in the
-# LICENSE file in the root directory of this source tree.
-
-import torch
-
-from segment_anything import sam_model_registry
-from segment_anything.utils.onnx import SamOnnxModel
-
-import argparse
-import warnings
-
-try:
- import onnxruntime # type: ignore
-
- onnxruntime_exists = True
-except ImportError:
- onnxruntime_exists = False
-
-parser = argparse.ArgumentParser(
- description="Export the SAM prompt encoder and mask decoder to an ONNX model."
-)
-
-parser.add_argument(
- "--checkpoint", type=str, required=True, help="The path to the SAM model checkpoint."
-)
-
-parser.add_argument(
- "--output", type=str, required=True, help="The filename to save the ONNX model to."
-)
-
-parser.add_argument(
- "--model-type",
- type=str,
- required=True,
- help="In ['default', 'vit_h', 'vit_l', 'vit_b']. Which type of SAM model to export.",
-)
-
-parser.add_argument(
- "--return-single-mask",
- action="store_true",
- help=(
- "If true, the exported ONNX model will only return the best mask, "
- "instead of returning multiple masks. For high resolution images "
- "this can improve runtime when upscaling masks is expensive."
- ),
-)
-
-parser.add_argument(
- "--opset",
- type=int,
- default=17,
- help="The ONNX opset version to use. Must be >=11",
-)
-
-parser.add_argument(
- "--quantize-out",
- type=str,
- default=None,
- help=(
- "If set, will quantize the model and save it with this name. "
- "Quantization is performed with quantize_dynamic from onnxruntime.quantization.quantize."
- ),
-)
-
-parser.add_argument(
- "--gelu-approximate",
- action="store_true",
- help=(
- "Replace GELU operations with approximations using tanh. Useful "
- "for some runtimes that have slow or unimplemented erf ops, used in GELU."
- ),
-)
-
-parser.add_argument(
- "--use-stability-score",
- action="store_true",
- help=(
- "Replaces the model's predicted mask quality score with the stability "
- "score calculated on the low resolution masks using an offset of 1.0. "
- ),
-)
-
-parser.add_argument(
- "--return-extra-metrics",
- action="store_true",
- help=(
- "The model will return five results: (masks, scores, stability_scores, "
- "areas, low_res_logits) instead of the usual three. This can be "
- "significantly slower for high resolution outputs."
- ),
-)
-
-
-def run_export(
- model_type: str,
- checkpoint: str,
- output: str,
- opset: int,
- return_single_mask: bool,
- gelu_approximate: bool = False,
- use_stability_score: bool = False,
- return_extra_metrics=False,
-):
- print("Loading model...")
- sam = sam_model_registry[model_type](checkpoint=checkpoint)
-
- onnx_model = SamOnnxModel(
- model=sam,
- return_single_mask=return_single_mask,
- use_stability_score=use_stability_score,
- return_extra_metrics=return_extra_metrics,
- )
-
- if gelu_approximate:
- for n, m in onnx_model.named_modules():
- if isinstance(m, torch.nn.GELU):
- m.approximate = "tanh"
-
- dynamic_axes = {
- "point_coords": {1: "num_points"},
- "point_labels": {1: "num_points"},
- }
-
- embed_dim = sam.prompt_encoder.embed_dim
- embed_size = sam.prompt_encoder.image_embedding_size
- mask_input_size = [4 * x for x in embed_size]
- dummy_inputs = {
- "image_embeddings": torch.randn(1, embed_dim, *embed_size, dtype=torch.float),
- "point_coords": torch.randint(low=0, high=1024, size=(1, 5, 2), dtype=torch.float),
- "point_labels": torch.randint(low=0, high=4, size=(1, 5), dtype=torch.float),
- "mask_input": torch.randn(1, 1, *mask_input_size, dtype=torch.float),
- "has_mask_input": torch.tensor([1], dtype=torch.float),
- "orig_im_size": torch.tensor([1500, 2250], dtype=torch.float),
- }
-
- _ = onnx_model(**dummy_inputs)
-
- output_names = ["masks", "iou_predictions", "low_res_masks"]
-
- with warnings.catch_warnings():
- warnings.filterwarnings("ignore", category=torch.jit.TracerWarning)
- warnings.filterwarnings("ignore", category=UserWarning)
- with open(output, "wb") as f:
- print(f"Exporting onnx model to {output}...")
- torch.onnx.export(
- onnx_model,
- tuple(dummy_inputs.values()),
- f,
- export_params=True,
- verbose=False,
- opset_version=opset,
- do_constant_folding=True,
- input_names=list(dummy_inputs.keys()),
- output_names=output_names,
- dynamic_axes=dynamic_axes,
- )
-
- if onnxruntime_exists:
- ort_inputs = {k: to_numpy(v) for k, v in dummy_inputs.items()}
- # set cpu provider default
- providers = ["CPUExecutionProvider"]
- ort_session = onnxruntime.InferenceSession(output, providers=providers)
- _ = ort_session.run(None, ort_inputs)
- print("Model has successfully been run with ONNXRuntime.")
-
-
-def to_numpy(tensor):
- return tensor.cpu().numpy()
-
-
-if __name__ == "__main__":
- args = parser.parse_args()
- run_export(
- model_type=args.model_type,
- checkpoint=args.checkpoint,
- output=args.output,
- opset=args.opset,
- return_single_mask=args.return_single_mask,
- gelu_approximate=args.gelu_approximate,
- use_stability_score=args.use_stability_score,
- return_extra_metrics=args.return_extra_metrics,
- )
-
- if args.quantize_out is not None:
- assert onnxruntime_exists, "onnxruntime is required to quantize the model."
- from onnxruntime.quantization import QuantType # type: ignore
- from onnxruntime.quantization.quantize import quantize_dynamic # type: ignore
-
- print(f"Quantizing model and writing to {args.quantize_out}...")
- quantize_dynamic(
- model_input=args.output,
- model_output=args.quantize_out,
- optimize_model=True,
- per_channel=False,
- reduce_range=False,
- weight_type=QuantType.QUInt8,
- )
- print("Done!")
diff --git a/spaces/Kayson/InstructDiffusion/scripts/download_instructdiffusion.sh b/spaces/Kayson/InstructDiffusion/scripts/download_instructdiffusion.sh
deleted file mode 100644
index c65d12906ab3a9cd7f6b5a0df93470d5fde6e5e9..0000000000000000000000000000000000000000
--- a/spaces/Kayson/InstructDiffusion/scripts/download_instructdiffusion.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-mkdir checkpoints
-
-wget https://github.com/TiankaiHang/storage-2023/releases/download/0924/v1-5-pruned-emaonly-adaption-task-humanalign_aa
-wget https://github.com/TiankaiHang/storage-2023/releases/download/0924/v1-5-pruned-emaonly-adaption-task-humanalign_ab
-wget https://github.com/TiankaiHang/storage-2023/releases/download/0924/v1-5-pruned-emaonly-adaption-task-humanalign_ac
-wget https://github.com/TiankaiHang/storage-2023/releases/download/0924/v1-5-pruned-emaonly-adaption-task-humanalign_ad
-wget https://github.com/TiankaiHang/storage-2023/releases/download/0924/v1-5-pruned-emaonly-adaption-task-humanalign_ae
-wget https://github.com/TiankaiHang/storage-2023/releases/download/0924/v1-5-pruned-emaonly-adaption-task-humanalign_af
-
-cat v1-5-pruned-emaonly-adaption-task-humanalign_* > checkpoints/v1-5-pruned-emaonly-adaption-task-humanalign.ckpt
-
-rm v1-5-pruned-emaonly-adaption-task-humanalign_*
-
-wget https://github.com/TiankaiHang/storage-2023/releases/download/0924/v1-5-pruned-emaonly-adaption-task_aa
-wget https://github.com/TiankaiHang/storage-2023/releases/download/0924/v1-5-pruned-emaonly-adaption-task_ab
-wget https://github.com/TiankaiHang/storage-2023/releases/download/0924/v1-5-pruned-emaonly-adaption-task_ac
-wget https://github.com/TiankaiHang/storage-2023/releases/download/0924/v1-5-pruned-emaonly-adaption-task_ad
-wget https://github.com/TiankaiHang/storage-2023/releases/download/0924/v1-5-pruned-emaonly-adaption-task_ae
-wget https://github.com/TiankaiHang/storage-2023/releases/download/0924/v1-5-pruned-emaonly-adaption-task_af
-
-cat v1-5-pruned-emaonly-adaption-task_* > checkpoints/v1-5-pruned-emaonly-adaption-task.ckpt
-
-rm v1-5-pruned-emaonly-adaption-task_*
diff --git a/spaces/Kororinpa/Amadeus_Project/monotonic_align/core.c b/spaces/Kororinpa/Amadeus_Project/monotonic_align/core.c
deleted file mode 100644
index 78f6aff68257660702f0b0ad278757a9728e84d5..0000000000000000000000000000000000000000
--- a/spaces/Kororinpa/Amadeus_Project/monotonic_align/core.c
+++ /dev/null
@@ -1,21608 +0,0 @@
-/* Generated by Cython 0.29.32 */
-
-/* BEGIN: Cython Metadata
-{
- "distutils": {
- "name": "monotonic_align.core",
- "sources": [
- "core.pyx"
- ]
- },
- "module_name": "monotonic_align.core"
-}
-END: Cython Metadata */
-
-#ifndef PY_SSIZE_T_CLEAN
-#define PY_SSIZE_T_CLEAN
-#endif /* PY_SSIZE_T_CLEAN */
-#include "Python.h"
-#ifndef Py_PYTHON_H
- #error Python headers needed to compile C extensions, please install development version of Python.
-#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
- #error Cython requires Python 2.6+ or Python 3.3+.
-#else
-#define CYTHON_ABI "0_29_32"
-#define CYTHON_HEX_VERSION 0x001D20F0
-#define CYTHON_FUTURE_DIVISION 0
-#include
-#ifndef offsetof
- #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
-#endif
-#if !defined(WIN32) && !defined(MS_WINDOWS)
- #ifndef __stdcall
- #define __stdcall
- #endif
- #ifndef __cdecl
- #define __cdecl
- #endif
- #ifndef __fastcall
- #define __fastcall
- #endif
-#endif
-#ifndef DL_IMPORT
- #define DL_IMPORT(t) t
-#endif
-#ifndef DL_EXPORT
- #define DL_EXPORT(t) t
-#endif
-#define __PYX_COMMA ,
-#ifndef HAVE_LONG_LONG
- #if PY_VERSION_HEX >= 0x02070000
- #define HAVE_LONG_LONG
- #endif
-#endif
-#ifndef PY_LONG_LONG
- #define PY_LONG_LONG LONG_LONG
-#endif
-#ifndef Py_HUGE_VAL
- #define Py_HUGE_VAL HUGE_VAL
-#endif
-#ifdef PYPY_VERSION
- #define CYTHON_COMPILING_IN_PYPY 1
- #define CYTHON_COMPILING_IN_PYSTON 0
- #define CYTHON_COMPILING_IN_CPYTHON 0
- #define CYTHON_COMPILING_IN_NOGIL 0
- #undef CYTHON_USE_TYPE_SLOTS
- #define CYTHON_USE_TYPE_SLOTS 0
- #undef CYTHON_USE_PYTYPE_LOOKUP
- #define CYTHON_USE_PYTYPE_LOOKUP 0
- #if PY_VERSION_HEX < 0x03050000
- #undef CYTHON_USE_ASYNC_SLOTS
- #define CYTHON_USE_ASYNC_SLOTS 0
- #elif !defined(CYTHON_USE_ASYNC_SLOTS)
- #define CYTHON_USE_ASYNC_SLOTS 1
- #endif
- #undef CYTHON_USE_PYLIST_INTERNALS
- #define CYTHON_USE_PYLIST_INTERNALS 0
- #undef CYTHON_USE_UNICODE_INTERNALS
- #define CYTHON_USE_UNICODE_INTERNALS 0
- #undef CYTHON_USE_UNICODE_WRITER
- #define CYTHON_USE_UNICODE_WRITER 0
- #undef CYTHON_USE_PYLONG_INTERNALS
- #define CYTHON_USE_PYLONG_INTERNALS 0
- #undef CYTHON_AVOID_BORROWED_REFS
- #define CYTHON_AVOID_BORROWED_REFS 1
- #undef CYTHON_ASSUME_SAFE_MACROS
- #define CYTHON_ASSUME_SAFE_MACROS 0
- #undef CYTHON_UNPACK_METHODS
- #define CYTHON_UNPACK_METHODS 0
- #undef CYTHON_FAST_THREAD_STATE
- #define CYTHON_FAST_THREAD_STATE 0
- #undef CYTHON_FAST_PYCALL
- #define CYTHON_FAST_PYCALL 0
- #undef CYTHON_PEP489_MULTI_PHASE_INIT
- #define CYTHON_PEP489_MULTI_PHASE_INIT 0
- #undef CYTHON_USE_TP_FINALIZE
- #define CYTHON_USE_TP_FINALIZE 0
- #undef CYTHON_USE_DICT_VERSIONS
- #define CYTHON_USE_DICT_VERSIONS 0
- #undef CYTHON_USE_EXC_INFO_STACK
- #define CYTHON_USE_EXC_INFO_STACK 0
- #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
- #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_HEX >= 0x07030900)
- #endif
-#elif defined(PYSTON_VERSION)
- #define CYTHON_COMPILING_IN_PYPY 0
- #define CYTHON_COMPILING_IN_PYSTON 1
- #define CYTHON_COMPILING_IN_CPYTHON 0
- #define CYTHON_COMPILING_IN_NOGIL 0
- #ifndef CYTHON_USE_TYPE_SLOTS
- #define CYTHON_USE_TYPE_SLOTS 1
- #endif
- #undef CYTHON_USE_PYTYPE_LOOKUP
- #define CYTHON_USE_PYTYPE_LOOKUP 0
- #undef CYTHON_USE_ASYNC_SLOTS
- #define CYTHON_USE_ASYNC_SLOTS 0
- #undef CYTHON_USE_PYLIST_INTERNALS
- #define CYTHON_USE_PYLIST_INTERNALS 0
- #ifndef CYTHON_USE_UNICODE_INTERNALS
- #define CYTHON_USE_UNICODE_INTERNALS 1
- #endif
- #undef CYTHON_USE_UNICODE_WRITER
- #define CYTHON_USE_UNICODE_WRITER 0
- #undef CYTHON_USE_PYLONG_INTERNALS
- #define CYTHON_USE_PYLONG_INTERNALS 0
- #ifndef CYTHON_AVOID_BORROWED_REFS
- #define CYTHON_AVOID_BORROWED_REFS 0
- #endif
- #ifndef CYTHON_ASSUME_SAFE_MACROS
- #define CYTHON_ASSUME_SAFE_MACROS 1
- #endif
- #ifndef CYTHON_UNPACK_METHODS
- #define CYTHON_UNPACK_METHODS 1
- #endif
- #undef CYTHON_FAST_THREAD_STATE
- #define CYTHON_FAST_THREAD_STATE 0
- #undef CYTHON_FAST_PYCALL
- #define CYTHON_FAST_PYCALL 0
- #undef CYTHON_PEP489_MULTI_PHASE_INIT
- #define CYTHON_PEP489_MULTI_PHASE_INIT 0
- #undef CYTHON_USE_TP_FINALIZE
- #define CYTHON_USE_TP_FINALIZE 0
- #undef CYTHON_USE_DICT_VERSIONS
- #define CYTHON_USE_DICT_VERSIONS 0
- #undef CYTHON_USE_EXC_INFO_STACK
- #define CYTHON_USE_EXC_INFO_STACK 0
- #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
- #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
- #endif
-#elif defined(PY_NOGIL)
- #define CYTHON_COMPILING_IN_PYPY 0
- #define CYTHON_COMPILING_IN_PYSTON 0
- #define CYTHON_COMPILING_IN_CPYTHON 0
- #define CYTHON_COMPILING_IN_NOGIL 1
- #ifndef CYTHON_USE_TYPE_SLOTS
- #define CYTHON_USE_TYPE_SLOTS 1
- #endif
- #undef CYTHON_USE_PYTYPE_LOOKUP
- #define CYTHON_USE_PYTYPE_LOOKUP 0
- #ifndef CYTHON_USE_ASYNC_SLOTS
- #define CYTHON_USE_ASYNC_SLOTS 1
- #endif
- #undef CYTHON_USE_PYLIST_INTERNALS
- #define CYTHON_USE_PYLIST_INTERNALS 0
- #ifndef CYTHON_USE_UNICODE_INTERNALS
- #define CYTHON_USE_UNICODE_INTERNALS 1
- #endif
- #undef CYTHON_USE_UNICODE_WRITER
- #define CYTHON_USE_UNICODE_WRITER 0
- #undef CYTHON_USE_PYLONG_INTERNALS
- #define CYTHON_USE_PYLONG_INTERNALS 0
- #ifndef CYTHON_AVOID_BORROWED_REFS
- #define CYTHON_AVOID_BORROWED_REFS 0
- #endif
- #ifndef CYTHON_ASSUME_SAFE_MACROS
- #define CYTHON_ASSUME_SAFE_MACROS 1
- #endif
- #ifndef CYTHON_UNPACK_METHODS
- #define CYTHON_UNPACK_METHODS 1
- #endif
- #undef CYTHON_FAST_THREAD_STATE
- #define CYTHON_FAST_THREAD_STATE 0
- #undef CYTHON_FAST_PYCALL
- #define CYTHON_FAST_PYCALL 0
- #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
- #define CYTHON_PEP489_MULTI_PHASE_INIT 1
- #endif
- #ifndef CYTHON_USE_TP_FINALIZE
- #define CYTHON_USE_TP_FINALIZE 1
- #endif
- #undef CYTHON_USE_DICT_VERSIONS
- #define CYTHON_USE_DICT_VERSIONS 0
- #undef CYTHON_USE_EXC_INFO_STACK
- #define CYTHON_USE_EXC_INFO_STACK 0
-#else
- #define CYTHON_COMPILING_IN_PYPY 0
- #define CYTHON_COMPILING_IN_PYSTON 0
- #define CYTHON_COMPILING_IN_CPYTHON 1
- #define CYTHON_COMPILING_IN_NOGIL 0
- #ifndef CYTHON_USE_TYPE_SLOTS
- #define CYTHON_USE_TYPE_SLOTS 1
- #endif
- #if PY_VERSION_HEX < 0x02070000
- #undef CYTHON_USE_PYTYPE_LOOKUP
- #define CYTHON_USE_PYTYPE_LOOKUP 0
- #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
- #define CYTHON_USE_PYTYPE_LOOKUP 1
- #endif
- #if PY_MAJOR_VERSION < 3
- #undef CYTHON_USE_ASYNC_SLOTS
- #define CYTHON_USE_ASYNC_SLOTS 0
- #elif !defined(CYTHON_USE_ASYNC_SLOTS)
- #define CYTHON_USE_ASYNC_SLOTS 1
- #endif
- #if PY_VERSION_HEX < 0x02070000
- #undef CYTHON_USE_PYLONG_INTERNALS
- #define CYTHON_USE_PYLONG_INTERNALS 0
- #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
- #define CYTHON_USE_PYLONG_INTERNALS 1
- #endif
- #ifndef CYTHON_USE_PYLIST_INTERNALS
- #define CYTHON_USE_PYLIST_INTERNALS 1
- #endif
- #ifndef CYTHON_USE_UNICODE_INTERNALS
- #define CYTHON_USE_UNICODE_INTERNALS 1
- #endif
- #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
- #undef CYTHON_USE_UNICODE_WRITER
- #define CYTHON_USE_UNICODE_WRITER 0
- #elif !defined(CYTHON_USE_UNICODE_WRITER)
- #define CYTHON_USE_UNICODE_WRITER 1
- #endif
- #ifndef CYTHON_AVOID_BORROWED_REFS
- #define CYTHON_AVOID_BORROWED_REFS 0
- #endif
- #ifndef CYTHON_ASSUME_SAFE_MACROS
- #define CYTHON_ASSUME_SAFE_MACROS 1
- #endif
- #ifndef CYTHON_UNPACK_METHODS
- #define CYTHON_UNPACK_METHODS 1
- #endif
- #if PY_VERSION_HEX >= 0x030B00A4
- #undef CYTHON_FAST_THREAD_STATE
- #define CYTHON_FAST_THREAD_STATE 0
- #elif !defined(CYTHON_FAST_THREAD_STATE)
- #define CYTHON_FAST_THREAD_STATE 1
- #endif
- #ifndef CYTHON_FAST_PYCALL
- #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030A0000)
- #endif
- #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
- #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
- #endif
- #ifndef CYTHON_USE_TP_FINALIZE
- #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
- #endif
- #ifndef CYTHON_USE_DICT_VERSIONS
- #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
- #endif
- #if PY_VERSION_HEX >= 0x030B00A4
- #undef CYTHON_USE_EXC_INFO_STACK
- #define CYTHON_USE_EXC_INFO_STACK 0
- #elif !defined(CYTHON_USE_EXC_INFO_STACK)
- #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
- #endif
- #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
- #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
- #endif
-#endif
-#if !defined(CYTHON_FAST_PYCCALL)
-#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
-#endif
-#if CYTHON_USE_PYLONG_INTERNALS
- #if PY_MAJOR_VERSION < 3
- #include "longintrepr.h"
- #endif
- #undef SHIFT
- #undef BASE
- #undef MASK
- #ifdef SIZEOF_VOID_P
- enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
- #endif
-#endif
-#ifndef __has_attribute
- #define __has_attribute(x) 0
-#endif
-#ifndef __has_cpp_attribute
- #define __has_cpp_attribute(x) 0
-#endif
-#ifndef CYTHON_RESTRICT
- #if defined(__GNUC__)
- #define CYTHON_RESTRICT __restrict__
- #elif defined(_MSC_VER) && _MSC_VER >= 1400
- #define CYTHON_RESTRICT __restrict
- #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
- #define CYTHON_RESTRICT restrict
- #else
- #define CYTHON_RESTRICT
- #endif
-#endif
-#ifndef CYTHON_UNUSED
-# if defined(__GNUC__)
-# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
-# define CYTHON_UNUSED __attribute__ ((__unused__))
-# else
-# define CYTHON_UNUSED
-# endif
-# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
-# define CYTHON_UNUSED __attribute__ ((__unused__))
-# else
-# define CYTHON_UNUSED
-# endif
-#endif
-#ifndef CYTHON_MAYBE_UNUSED_VAR
-# if defined(__cplusplus)
- template void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
-# else
-# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
-# endif
-#endif
-#ifndef CYTHON_NCP_UNUSED
-# if CYTHON_COMPILING_IN_CPYTHON
-# define CYTHON_NCP_UNUSED
-# else
-# define CYTHON_NCP_UNUSED CYTHON_UNUSED
-# endif
-#endif
-#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
-#ifdef _MSC_VER
- #ifndef _MSC_STDINT_H_
- #if _MSC_VER < 1300
- typedef unsigned char uint8_t;
- typedef unsigned int uint32_t;
- #else
- typedef unsigned __int8 uint8_t;
- typedef unsigned __int32 uint32_t;
- #endif
- #endif
-#else
- #include
-#endif
-#ifndef CYTHON_FALLTHROUGH
- #if defined(__cplusplus) && __cplusplus >= 201103L
- #if __has_cpp_attribute(fallthrough)
- #define CYTHON_FALLTHROUGH [[fallthrough]]
- #elif __has_cpp_attribute(clang::fallthrough)
- #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
- #elif __has_cpp_attribute(gnu::fallthrough)
- #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
- #endif
- #endif
- #ifndef CYTHON_FALLTHROUGH
- #if __has_attribute(fallthrough)
- #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
- #else
- #define CYTHON_FALLTHROUGH
- #endif
- #endif
- #if defined(__clang__ ) && defined(__apple_build_version__)
- #if __apple_build_version__ < 7000000
- #undef CYTHON_FALLTHROUGH
- #define CYTHON_FALLTHROUGH
- #endif
- #endif
-#endif
-
-#ifndef CYTHON_INLINE
- #if defined(__clang__)
- #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
- #elif defined(__GNUC__)
- #define CYTHON_INLINE __inline__
- #elif defined(_MSC_VER)
- #define CYTHON_INLINE __inline
- #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
- #define CYTHON_INLINE inline
- #else
- #define CYTHON_INLINE
- #endif
-#endif
-
-#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
- #define Py_OptimizeFlag 0
-#endif
-#define __PYX_BUILD_PY_SSIZE_T "n"
-#define CYTHON_FORMAT_SSIZE_T "z"
-#if PY_MAJOR_VERSION < 3
- #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
- PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
- #define __Pyx_DefaultClassType PyClass_Type
-#else
- #define __Pyx_BUILTIN_MODULE_NAME "builtins"
- #define __Pyx_DefaultClassType PyType_Type
-#if PY_VERSION_HEX >= 0x030B00A1
- static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f,
- PyObject *code, PyObject *c, PyObject* n, PyObject *v,
- PyObject *fv, PyObject *cell, PyObject* fn,
- PyObject *name, int fline, PyObject *lnos) {
- PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL;
- PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL;
- const char *fn_cstr=NULL;
- const char *name_cstr=NULL;
- PyCodeObject* co=NULL;
- PyObject *type, *value, *traceback;
- PyErr_Fetch(&type, &value, &traceback);
- if (!(kwds=PyDict_New())) goto end;
- if (!(argcount=PyLong_FromLong(a))) goto end;
- if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end;
- if (!(posonlyargcount=PyLong_FromLong(0))) goto end;
- if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end;
- if (!(kwonlyargcount=PyLong_FromLong(k))) goto end;
- if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end;
- if (!(nlocals=PyLong_FromLong(l))) goto end;
- if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end;
- if (!(stacksize=PyLong_FromLong(s))) goto end;
- if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end;
- if (!(flags=PyLong_FromLong(f))) goto end;
- if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end;
- if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end;
- if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end;
- if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end;
- if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end;
- if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end;
- if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end;
- if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end;
- if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end;
- if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end;
- if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end;
- if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too;
- if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here
- if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too;
- Py_XDECREF((PyObject*)co);
- co = (PyCodeObject*)call_result;
- call_result = NULL;
- if (0) {
- cleanup_code_too:
- Py_XDECREF((PyObject*)co);
- co = NULL;
- }
- end:
- Py_XDECREF(kwds);
- Py_XDECREF(argcount);
- Py_XDECREF(posonlyargcount);
- Py_XDECREF(kwonlyargcount);
- Py_XDECREF(nlocals);
- Py_XDECREF(stacksize);
- Py_XDECREF(replace);
- Py_XDECREF(call_result);
- Py_XDECREF(empty);
- if (type) {
- PyErr_Restore(type, value, traceback);
- }
- return co;
- }
-#else
- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
- PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
-#endif
- #define __Pyx_DefaultClassType PyType_Type
-#endif
-#ifndef Py_TPFLAGS_CHECKTYPES
- #define Py_TPFLAGS_CHECKTYPES 0
-#endif
-#ifndef Py_TPFLAGS_HAVE_INDEX
- #define Py_TPFLAGS_HAVE_INDEX 0
-#endif
-#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
- #define Py_TPFLAGS_HAVE_NEWBUFFER 0
-#endif
-#ifndef Py_TPFLAGS_HAVE_FINALIZE
- #define Py_TPFLAGS_HAVE_FINALIZE 0
-#endif
-#ifndef METH_STACKLESS
- #define METH_STACKLESS 0
-#endif
-#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
- #ifndef METH_FASTCALL
- #define METH_FASTCALL 0x80
- #endif
- typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
- typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
- Py_ssize_t nargs, PyObject *kwnames);
-#else
- #define __Pyx_PyCFunctionFast _PyCFunctionFast
- #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
-#endif
-#if CYTHON_FAST_PYCCALL
-#define __Pyx_PyFastCFunction_Check(func)\
- ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
-#else
-#define __Pyx_PyFastCFunction_Check(func) 0
-#endif
-#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
- #define PyObject_Malloc(s) PyMem_Malloc(s)
- #define PyObject_Free(p) PyMem_Free(p)
- #define PyObject_Realloc(p) PyMem_Realloc(p)
-#endif
-#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
- #define PyMem_RawMalloc(n) PyMem_Malloc(n)
- #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
- #define PyMem_RawFree(p) PyMem_Free(p)
-#endif
-#if CYTHON_COMPILING_IN_PYSTON
- #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
- #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
-#else
- #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
- #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
-#endif
-#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
- #define __Pyx_PyThreadState_Current PyThreadState_GET()
-#elif PY_VERSION_HEX >= 0x03060000
- #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
-#elif PY_VERSION_HEX >= 0x03000000
- #define __Pyx_PyThreadState_Current PyThreadState_GET()
-#else
- #define __Pyx_PyThreadState_Current _PyThreadState_Current
-#endif
-#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
-#include "pythread.h"
-#define Py_tss_NEEDS_INIT 0
-typedef int Py_tss_t;
-static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
- *key = PyThread_create_key();
- return 0;
-}
-static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
- Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
- *key = Py_tss_NEEDS_INIT;
- return key;
-}
-static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
- PyObject_Free(key);
-}
-static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
- return *key != Py_tss_NEEDS_INIT;
-}
-static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
- PyThread_delete_key(*key);
- *key = Py_tss_NEEDS_INIT;
-}
-static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
- return PyThread_set_key_value(*key, value);
-}
-static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
- return PyThread_get_key_value(*key);
-}
-#endif
-#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
-#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
-#else
-#define __Pyx_PyDict_NewPresized(n) PyDict_New()
-#endif
-#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
- #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
- #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
-#else
- #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
- #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
-#endif
-#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
-#define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
-#else
-#define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
-#endif
-#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
- #define CYTHON_PEP393_ENABLED 1
- #if defined(PyUnicode_IS_READY)
- #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
- 0 : _PyUnicode_Ready((PyObject *)(op)))
- #else
- #define __Pyx_PyUnicode_READY(op) (0)
- #endif
- #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
- #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
- #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
- #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
- #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
- #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
- #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
- #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
- #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
- #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
- #else
- #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
- #endif
- #else
- #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
- #endif
-#else
- #define CYTHON_PEP393_ENABLED 0
- #define PyUnicode_1BYTE_KIND 1
- #define PyUnicode_2BYTE_KIND 2
- #define PyUnicode_4BYTE_KIND 4
- #define __Pyx_PyUnicode_READY(op) (0)
- #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
- #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
- #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
- #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
- #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
- #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
- #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
- #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
-#endif
-#if CYTHON_COMPILING_IN_PYPY
- #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
- #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
-#else
- #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
- #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
- PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
-#endif
-#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
- #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
-#endif
-#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
- #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
-#endif
-#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
- #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
-#endif
-#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
-#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
-#if PY_MAJOR_VERSION >= 3
- #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
-#else
- #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
-#endif
-#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
- #define PyObject_ASCII(o) PyObject_Repr(o)
-#endif
-#if PY_MAJOR_VERSION >= 3
- #define PyBaseString_Type PyUnicode_Type
- #define PyStringObject PyUnicodeObject
- #define PyString_Type PyUnicode_Type
- #define PyString_Check PyUnicode_Check
- #define PyString_CheckExact PyUnicode_CheckExact
-#ifndef PyObject_Unicode
- #define PyObject_Unicode PyObject_Str
-#endif
-#endif
-#if PY_MAJOR_VERSION >= 3
- #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
- #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
-#else
- #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
- #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
-#endif
-#ifndef PySet_CheckExact
- #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
-#endif
-#if PY_VERSION_HEX >= 0x030900A4
- #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
- #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
-#else
- #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
- #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
-#endif
-#if CYTHON_ASSUME_SAFE_MACROS
- #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
-#else
- #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
-#endif
-#if PY_MAJOR_VERSION >= 3
- #define PyIntObject PyLongObject
- #define PyInt_Type PyLong_Type
- #define PyInt_Check(op) PyLong_Check(op)
- #define PyInt_CheckExact(op) PyLong_CheckExact(op)
- #define PyInt_FromString PyLong_FromString
- #define PyInt_FromUnicode PyLong_FromUnicode
- #define PyInt_FromLong PyLong_FromLong
- #define PyInt_FromSize_t PyLong_FromSize_t
- #define PyInt_FromSsize_t PyLong_FromSsize_t
- #define PyInt_AsLong PyLong_AsLong
- #define PyInt_AS_LONG PyLong_AS_LONG
- #define PyInt_AsSsize_t PyLong_AsSsize_t
- #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
- #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
- #define PyNumber_Int PyNumber_Long
-#endif
-#if PY_MAJOR_VERSION >= 3
- #define PyBoolObject PyLongObject
-#endif
-#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
- #ifndef PyUnicode_InternFromString
- #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
- #endif
-#endif
-#if PY_VERSION_HEX < 0x030200A4
- typedef long Py_hash_t;
- #define __Pyx_PyInt_FromHash_t PyInt_FromLong
- #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t
-#else
- #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
- #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t
-#endif
-#if PY_MAJOR_VERSION >= 3
- #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
-#else
- #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
-#endif
-#if CYTHON_USE_ASYNC_SLOTS
- #if PY_VERSION_HEX >= 0x030500B1
- #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
- #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
- #else
- #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
- #endif
-#else
- #define __Pyx_PyType_AsAsync(obj) NULL
-#endif
-#ifndef __Pyx_PyAsyncMethodsStruct
- typedef struct {
- unaryfunc am_await;
- unaryfunc am_aiter;
- unaryfunc am_anext;
- } __Pyx_PyAsyncMethodsStruct;
-#endif
-
-#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
- #if !defined(_USE_MATH_DEFINES)
- #define _USE_MATH_DEFINES
- #endif
-#endif
-#include
-#ifdef NAN
-#define __PYX_NAN() ((float) NAN)
-#else
-static CYTHON_INLINE float __PYX_NAN() {
- float value;
- memset(&value, 0xFF, sizeof(value));
- return value;
-}
-#endif
-#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
-#define __Pyx_truncl trunc
-#else
-#define __Pyx_truncl truncl
-#endif
-
-#define __PYX_MARK_ERR_POS(f_index, lineno) \
- { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
-#define __PYX_ERR(f_index, lineno, Ln_error) \
- { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
-
-#ifndef __PYX_EXTERN_C
- #ifdef __cplusplus
- #define __PYX_EXTERN_C extern "C"
- #else
- #define __PYX_EXTERN_C extern
- #endif
-#endif
-
-#define __PYX_HAVE__monotonic_align__core
-#define __PYX_HAVE_API__monotonic_align__core
-/* Early includes */
-#include "pythread.h"
-#include
-#include
-#include
-#include "pystate.h"
-#ifdef _OPENMP
-#include
-#endif /* _OPENMP */
-
-#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
-#define CYTHON_WITHOUT_ASSERTIONS
-#endif
-
-typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
- const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
-
-#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
-#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
-#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
-#define __PYX_DEFAULT_STRING_ENCODING ""
-#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
-#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
-#define __Pyx_uchar_cast(c) ((unsigned char)c)
-#define __Pyx_long_cast(x) ((long)x)
-#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
- (sizeof(type) < sizeof(Py_ssize_t)) ||\
- (sizeof(type) > sizeof(Py_ssize_t) &&\
- likely(v < (type)PY_SSIZE_T_MAX ||\
- v == (type)PY_SSIZE_T_MAX) &&\
- (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
- v == (type)PY_SSIZE_T_MIN))) ||\
- (sizeof(type) == sizeof(Py_ssize_t) &&\
- (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
- v == (type)PY_SSIZE_T_MAX))) )
-static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
- return (size_t) i < (size_t) limit;
-}
-#if defined (__cplusplus) && __cplusplus >= 201103L
- #include
- #define __Pyx_sst_abs(value) std::abs(value)
-#elif SIZEOF_INT >= SIZEOF_SIZE_T
- #define __Pyx_sst_abs(value) abs(value)
-#elif SIZEOF_LONG >= SIZEOF_SIZE_T
- #define __Pyx_sst_abs(value) labs(value)
-#elif defined (_MSC_VER)
- #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
-#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
- #define __Pyx_sst_abs(value) llabs(value)
-#elif defined (__GNUC__)
- #define __Pyx_sst_abs(value) __builtin_llabs(value)
-#else
- #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
-#endif
-static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
-static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
-#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
-#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
-#define __Pyx_PyBytes_FromString PyBytes_FromString
-#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
-static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
-#if PY_MAJOR_VERSION < 3
- #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
- #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
-#else
- #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
- #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
-#endif
-#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
-#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
-#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
-#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
-#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
-#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
-#define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
-#define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
-#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
-#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
-#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
-#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
-#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
-#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
-#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
-#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
-static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
- const Py_UNICODE *u_end = u;
- while (*u_end++) ;
- return (size_t)(u_end - u - 1);
-}
-#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
-#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
-#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
-#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
-#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
-static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
-static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
-static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
-static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
-#define __Pyx_PySequence_Tuple(obj)\
- (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
-static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
-static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
-static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
-#if CYTHON_ASSUME_SAFE_MACROS
-#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
-#else
-#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
-#endif
-#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
-#if PY_MAJOR_VERSION >= 3
-#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
-#else
-#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
-#endif
-#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
-#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
-static int __Pyx_sys_getdefaultencoding_not_ascii;
-static int __Pyx_init_sys_getdefaultencoding_params(void) {
- PyObject* sys;
- PyObject* default_encoding = NULL;
- PyObject* ascii_chars_u = NULL;
- PyObject* ascii_chars_b = NULL;
- const char* default_encoding_c;
- sys = PyImport_ImportModule("sys");
- if (!sys) goto bad;
- default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
- Py_DECREF(sys);
- if (!default_encoding) goto bad;
- default_encoding_c = PyBytes_AsString(default_encoding);
- if (!default_encoding_c) goto bad;
- if (strcmp(default_encoding_c, "ascii") == 0) {
- __Pyx_sys_getdefaultencoding_not_ascii = 0;
- } else {
- char ascii_chars[128];
- int c;
- for (c = 0; c < 128; c++) {
- ascii_chars[c] = c;
- }
- __Pyx_sys_getdefaultencoding_not_ascii = 1;
- ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
- if (!ascii_chars_u) goto bad;
- ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
- if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
- PyErr_Format(
- PyExc_ValueError,
- "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
- default_encoding_c);
- goto bad;
- }
- Py_DECREF(ascii_chars_u);
- Py_DECREF(ascii_chars_b);
- }
- Py_DECREF(default_encoding);
- return 0;
-bad:
- Py_XDECREF(default_encoding);
- Py_XDECREF(ascii_chars_u);
- Py_XDECREF(ascii_chars_b);
- return -1;
-}
-#endif
-#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
-#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
-#else
-#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
-#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
-static char* __PYX_DEFAULT_STRING_ENCODING;
-static int __Pyx_init_sys_getdefaultencoding_params(void) {
- PyObject* sys;
- PyObject* default_encoding = NULL;
- char* default_encoding_c;
- sys = PyImport_ImportModule("sys");
- if (!sys) goto bad;
- default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
- Py_DECREF(sys);
- if (!default_encoding) goto bad;
- default_encoding_c = PyBytes_AsString(default_encoding);
- if (!default_encoding_c) goto bad;
- __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
- if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
- strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
- Py_DECREF(default_encoding);
- return 0;
-bad:
- Py_XDECREF(default_encoding);
- return -1;
-}
-#endif
-#endif
-
-
-/* Test for GCC > 2.95 */
-#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
- #define likely(x) __builtin_expect(!!(x), 1)
- #define unlikely(x) __builtin_expect(!!(x), 0)
-#else /* !__GNUC__ or GCC < 2.95 */
- #define likely(x) (x)
- #define unlikely(x) (x)
-#endif /* __GNUC__ */
-static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
-
-static PyObject *__pyx_m = NULL;
-static PyObject *__pyx_d;
-static PyObject *__pyx_b;
-static PyObject *__pyx_cython_runtime = NULL;
-static PyObject *__pyx_empty_tuple;
-static PyObject *__pyx_empty_bytes;
-static PyObject *__pyx_empty_unicode;
-static int __pyx_lineno;
-static int __pyx_clineno = 0;
-static const char * __pyx_cfilenm= __FILE__;
-static const char *__pyx_filename;
-
-
-static const char *__pyx_f[] = {
- "core.pyx",
- "stringsource",
-};
-/* NoFastGil.proto */
-#define __Pyx_PyGILState_Ensure PyGILState_Ensure
-#define __Pyx_PyGILState_Release PyGILState_Release
-#define __Pyx_FastGIL_Remember()
-#define __Pyx_FastGIL_Forget()
-#define __Pyx_FastGilFuncInit()
-
-/* MemviewSliceStruct.proto */
-struct __pyx_memoryview_obj;
-typedef struct {
- struct __pyx_memoryview_obj *memview;
- char *data;
- Py_ssize_t shape[8];
- Py_ssize_t strides[8];
- Py_ssize_t suboffsets[8];
-} __Pyx_memviewslice;
-#define __Pyx_MemoryView_Len(m) (m.shape[0])
-
-/* Atomics.proto */
-#include
-#ifndef CYTHON_ATOMICS
- #define CYTHON_ATOMICS 1
-#endif
-#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS
-#define __pyx_atomic_int_type int
-#if CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\
- (__GNUC_MINOR__ > 1 ||\
- (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2))))
- #define __pyx_atomic_incr_aligned(value) __sync_fetch_and_add(value, 1)
- #define __pyx_atomic_decr_aligned(value) __sync_fetch_and_sub(value, 1)
- #ifdef __PYX_DEBUG_ATOMICS
- #warning "Using GNU atomics"
- #endif
-#elif CYTHON_ATOMICS && defined(_MSC_VER) && CYTHON_COMPILING_IN_NOGIL
- #include
- #undef __pyx_atomic_int_type
- #define __pyx_atomic_int_type long
- #pragma intrinsic (_InterlockedExchangeAdd)
- #define __pyx_atomic_incr_aligned(value) _InterlockedExchangeAdd(value, 1)
- #define __pyx_atomic_decr_aligned(value) _InterlockedExchangeAdd(value, -1)
- #ifdef __PYX_DEBUG_ATOMICS
- #pragma message ("Using MSVC atomics")
- #endif
-#else
- #undef CYTHON_ATOMICS
- #define CYTHON_ATOMICS 0
- #ifdef __PYX_DEBUG_ATOMICS
- #warning "Not using atomics"
- #endif
-#endif
-typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
-#if CYTHON_ATOMICS
- #define __pyx_add_acquisition_count(memview)\
- __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview))
- #define __pyx_sub_acquisition_count(memview)\
- __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview))
-#else
- #define __pyx_add_acquisition_count(memview)\
- __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
- #define __pyx_sub_acquisition_count(memview)\
- __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
-#endif
-
-/* ForceInitThreads.proto */
-#ifndef __PYX_FORCE_INIT_THREADS
- #define __PYX_FORCE_INIT_THREADS 0
-#endif
-
-/* BufferFormatStructs.proto */
-#define IS_UNSIGNED(type) (((type) -1) > 0)
-struct __Pyx_StructField_;
-#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
-typedef struct {
- const char* name;
- struct __Pyx_StructField_* fields;
- size_t size;
- size_t arraysize[8];
- int ndim;
- char typegroup;
- char is_unsigned;
- int flags;
-} __Pyx_TypeInfo;
-typedef struct __Pyx_StructField_ {
- __Pyx_TypeInfo* type;
- const char* name;
- size_t offset;
-} __Pyx_StructField;
-typedef struct {
- __Pyx_StructField* field;
- size_t parent_offset;
-} __Pyx_BufFmt_StackElem;
-typedef struct {
- __Pyx_StructField root;
- __Pyx_BufFmt_StackElem* head;
- size_t fmt_offset;
- size_t new_count, enc_count;
- size_t struct_alignment;
- int is_complex;
- char enc_type;
- char new_packmode;
- char enc_packmode;
- char is_valid_array;
-} __Pyx_BufFmt_Context;
-
-
-/*--- Type declarations ---*/
-struct __pyx_array_obj;
-struct __pyx_MemviewEnum_obj;
-struct __pyx_memoryview_obj;
-struct __pyx_memoryviewslice_obj;
-struct __pyx_opt_args_15monotonic_align_4core_maximum_path_each;
-
-/* "monotonic_align/core.pyx":7
- * @cython.boundscheck(False)
- * @cython.wraparound(False)
- * cdef void maximum_path_each(int[:,::1] path, float[:,::1] value, int t_y, int t_x, float max_neg_val=-1e9) nogil: # <<<<<<<<<<<<<<
- * cdef int x
- * cdef int y
- */
-struct __pyx_opt_args_15monotonic_align_4core_maximum_path_each {
- int __pyx_n;
- float max_neg_val;
-};
-
-/* "View.MemoryView":106
- *
- * @cname("__pyx_array")
- * cdef class array: # <<<<<<<<<<<<<<
- *
- * cdef:
- */
-struct __pyx_array_obj {
- PyObject_HEAD
- struct __pyx_vtabstruct_array *__pyx_vtab;
- char *data;
- Py_ssize_t len;
- char *format;
- int ndim;
- Py_ssize_t *_shape;
- Py_ssize_t *_strides;
- Py_ssize_t itemsize;
- PyObject *mode;
- PyObject *_format;
- void (*callback_free_data)(void *);
- int free_data;
- int dtype_is_object;
-};
-
-
-/* "View.MemoryView":280
- *
- * @cname('__pyx_MemviewEnum')
- * cdef class Enum(object): # <<<<<<<<<<<<<<
- * cdef object name
- * def __init__(self, name):
- */
-struct __pyx_MemviewEnum_obj {
- PyObject_HEAD
- PyObject *name;
-};
-
-
-/* "View.MemoryView":331
- *
- * @cname('__pyx_memoryview')
- * cdef class memoryview(object): # <<<<<<<<<<<<<<
- *
- * cdef object obj
- */
-struct __pyx_memoryview_obj {
- PyObject_HEAD
- struct __pyx_vtabstruct_memoryview *__pyx_vtab;
- PyObject *obj;
- PyObject *_size;
- PyObject *_array_interface;
- PyThread_type_lock lock;
- __pyx_atomic_int acquisition_count[2];
- __pyx_atomic_int *acquisition_count_aligned_p;
- Py_buffer view;
- int flags;
- int dtype_is_object;
- __Pyx_TypeInfo *typeinfo;
-};
-
-
-/* "View.MemoryView":967
- *
- * @cname('__pyx_memoryviewslice')
- * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
- * "Internal class for passing memoryview slices to Python"
- *
- */
-struct __pyx_memoryviewslice_obj {
- struct __pyx_memoryview_obj __pyx_base;
- __Pyx_memviewslice from_slice;
- PyObject *from_object;
- PyObject *(*to_object_func)(char *);
- int (*to_dtype_func)(char *, PyObject *);
-};
-
-
-
-/* "View.MemoryView":106
- *
- * @cname("__pyx_array")
- * cdef class array: # <<<<<<<<<<<<<<
- *
- * cdef:
- */
-
-struct __pyx_vtabstruct_array {
- PyObject *(*get_memview)(struct __pyx_array_obj *);
-};
-static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;
-
-
-/* "View.MemoryView":331
- *
- * @cname('__pyx_memoryview')
- * cdef class memoryview(object): # <<<<<<<<<<<<<<
- *
- * cdef object obj
- */
-
-struct __pyx_vtabstruct_memoryview {
- char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *);
- PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *);
- PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
- PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *);
- PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
- PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *);
- PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *);
-};
-static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;
-
-
-/* "View.MemoryView":967
- *
- * @cname('__pyx_memoryviewslice')
- * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
- * "Internal class for passing memoryview slices to Python"
- *
- */
-
-struct __pyx_vtabstruct__memoryviewslice {
- struct __pyx_vtabstruct_memoryview __pyx_base;
-};
-static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
-
-/* --- Runtime support code (head) --- */
-/* Refnanny.proto */
-#ifndef CYTHON_REFNANNY
- #define CYTHON_REFNANNY 0
-#endif
-#if CYTHON_REFNANNY
- typedef struct {
- void (*INCREF)(void*, PyObject*, int);
- void (*DECREF)(void*, PyObject*, int);
- void (*GOTREF)(void*, PyObject*, int);
- void (*GIVEREF)(void*, PyObject*, int);
- void* (*SetupContext)(const char*, int, const char*);
- void (*FinishContext)(void**);
- } __Pyx_RefNannyAPIStruct;
- static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
- static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
- #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
-#ifdef WITH_THREAD
- #define __Pyx_RefNannySetupContext(name, acquire_gil)\
- if (acquire_gil) {\
- PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
- __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
- PyGILState_Release(__pyx_gilstate_save);\
- } else {\
- __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
- }
-#else
- #define __Pyx_RefNannySetupContext(name, acquire_gil)\
- __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
-#endif
- #define __Pyx_RefNannyFinishContext()\
- __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
- #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
- #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
- #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
- #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
- #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
- #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
- #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
- #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
-#else
- #define __Pyx_RefNannyDeclarations
- #define __Pyx_RefNannySetupContext(name, acquire_gil)
- #define __Pyx_RefNannyFinishContext()
- #define __Pyx_INCREF(r) Py_INCREF(r)
- #define __Pyx_DECREF(r) Py_DECREF(r)
- #define __Pyx_GOTREF(r)
- #define __Pyx_GIVEREF(r)
- #define __Pyx_XINCREF(r) Py_XINCREF(r)
- #define __Pyx_XDECREF(r) Py_XDECREF(r)
- #define __Pyx_XGOTREF(r)
- #define __Pyx_XGIVEREF(r)
-#endif
-#define __Pyx_XDECREF_SET(r, v) do {\
- PyObject *tmp = (PyObject *) r;\
- r = v; __Pyx_XDECREF(tmp);\
- } while (0)
-#define __Pyx_DECREF_SET(r, v) do {\
- PyObject *tmp = (PyObject *) r;\
- r = v; __Pyx_DECREF(tmp);\
- } while (0)
-#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
-#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
-
-/* PyObjectGetAttrStr.proto */
-#if CYTHON_USE_TYPE_SLOTS
-static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
-#else
-#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
-#endif
-
-/* GetBuiltinName.proto */
-static PyObject *__Pyx_GetBuiltinName(PyObject *name);
-
-/* MemviewSliceInit.proto */
-#define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d
-#define __Pyx_MEMVIEW_DIRECT 1
-#define __Pyx_MEMVIEW_PTR 2
-#define __Pyx_MEMVIEW_FULL 4
-#define __Pyx_MEMVIEW_CONTIG 8
-#define __Pyx_MEMVIEW_STRIDED 16
-#define __Pyx_MEMVIEW_FOLLOW 32
-#define __Pyx_IS_C_CONTIG 1
-#define __Pyx_IS_F_CONTIG 2
-static int __Pyx_init_memviewslice(
- struct __pyx_memoryview_obj *memview,
- int ndim,
- __Pyx_memviewslice *memviewslice,
- int memview_is_new_reference);
-static CYTHON_INLINE int __pyx_add_acquisition_count_locked(
- __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
-static CYTHON_INLINE int __pyx_sub_acquisition_count_locked(
- __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
-#define __pyx_get_slice_count_pointer(memview) (memview->acquisition_count_aligned_p)
-#define __pyx_get_slice_count(memview) (*__pyx_get_slice_count_pointer(memview))
-#define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__)
-#define __PYX_XDEC_MEMVIEW(slice, have_gil) __Pyx_XDEC_MEMVIEW(slice, have_gil, __LINE__)
-static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int);
-static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *, int, int);
-
-/* RaiseArgTupleInvalid.proto */
-static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
- Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
-
-/* RaiseDoubleKeywords.proto */
-static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
-
-/* ParseKeywords.proto */
-static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
- PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
- const char* function_name);
-
-/* None.proto */
-static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
-
-/* ArgTypeTest.proto */
-#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
- ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
- __Pyx__ArgTypeTest(obj, type, name, exact))
-static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
-
-/* PyObjectCall.proto */
-#if CYTHON_COMPILING_IN_CPYTHON
-static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
-#else
-#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
-#endif
-
-/* PyThreadStateGet.proto */
-#if CYTHON_FAST_THREAD_STATE
-#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
-#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
-#define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
-#else
-#define __Pyx_PyThreadState_declare
-#define __Pyx_PyThreadState_assign
-#define __Pyx_PyErr_Occurred() PyErr_Occurred()
-#endif
-
-/* PyErrFetchRestore.proto */
-#if CYTHON_FAST_THREAD_STATE
-#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
-#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
-#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
-#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
-#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
-static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
-static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
-#if CYTHON_COMPILING_IN_CPYTHON
-#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
-#else
-#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
-#endif
-#else
-#define __Pyx_PyErr_Clear() PyErr_Clear()
-#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
-#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
-#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
-#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
-#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
-#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
-#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
-#endif
-
-/* RaiseException.proto */
-static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
-
-/* PyCFunctionFastCall.proto */
-#if CYTHON_FAST_PYCCALL
-static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
-#else
-#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
-#endif
-
-/* PyFunctionFastCall.proto */
-#if CYTHON_FAST_PYCALL
-#define __Pyx_PyFunction_FastCall(func, args, nargs)\
- __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
-#if 1 || PY_VERSION_HEX < 0x030600B1
-static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
-#else
-#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
-#endif
-#define __Pyx_BUILD_ASSERT_EXPR(cond)\
- (sizeof(char [1 - 2*!(cond)]) - 1)
-#ifndef Py_MEMBER_SIZE
-#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
-#endif
-#if CYTHON_FAST_PYCALL
- static size_t __pyx_pyframe_localsplus_offset = 0;
- #include "frameobject.h"
-#if PY_VERSION_HEX >= 0x030b00a6
- #ifndef Py_BUILD_CORE
- #define Py_BUILD_CORE 1
- #endif
- #include "internal/pycore_frame.h"
-#endif
- #define __Pxy_PyFrame_Initialize_Offsets()\
- ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
- (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
- #define __Pyx_PyFrame_GetLocalsplus(frame)\
- (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
-#endif // CYTHON_FAST_PYCALL
-#endif
-
-/* PyObjectCall2Args.proto */
-static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
-
-/* PyObjectCallMethO.proto */
-#if CYTHON_COMPILING_IN_CPYTHON
-static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
-#endif
-
-/* PyObjectCallOneArg.proto */
-static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
-
-/* IncludeStringH.proto */
-#include
-
-/* BytesEquals.proto */
-static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
-
-/* UnicodeEquals.proto */
-static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
-
-/* StrEquals.proto */
-#if PY_MAJOR_VERSION >= 3
-#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
-#else
-#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
-#endif
-
-/* DivInt[Py_ssize_t].proto */
-static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t);
-
-/* UnaryNegOverflows.proto */
-#define UNARY_NEG_WOULD_OVERFLOW(x)\
- (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
-
-static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
-static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
-/* GetAttr.proto */
-static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
-
-/* GetItemInt.proto */
-#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
- (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
- __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
- (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
- __Pyx_GetItemInt_Generic(o, to_py_func(i))))
-#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
- (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
- __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
- (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
- int wraparound, int boundscheck);
-#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
- (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
- __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
- (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
- int wraparound, int boundscheck);
-static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
- int is_list, int wraparound, int boundscheck);
-
-/* ObjectGetItem.proto */
-#if CYTHON_USE_TYPE_SLOTS
-static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
-#else
-#define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
-#endif
-
-/* decode_c_string_utf16.proto */
-static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
- int byteorder = 0;
- return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
-}
-static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
- int byteorder = -1;
- return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
-}
-static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
- int byteorder = 1;
- return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
-}
-
-/* decode_c_string.proto */
-static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
- const char* cstring, Py_ssize_t start, Py_ssize_t stop,
- const char* encoding, const char* errors,
- PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
-
-/* PyErrExceptionMatches.proto */
-#if CYTHON_FAST_THREAD_STATE
-#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
-static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
-#else
-#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
-#endif
-
-/* GetAttr3.proto */
-static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
-
-/* PyDictVersioning.proto */
-#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
-#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
-#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
-#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
- (version_var) = __PYX_GET_DICT_VERSION(dict);\
- (cache_var) = (value);
-#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
- static PY_UINT64_T __pyx_dict_version = 0;\
- static PyObject *__pyx_dict_cached_value = NULL;\
- if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
- (VAR) = __pyx_dict_cached_value;\
- } else {\
- (VAR) = __pyx_dict_cached_value = (LOOKUP);\
- __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
- }\
-}
-static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
-static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
-static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
-#else
-#define __PYX_GET_DICT_VERSION(dict) (0)
-#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
-#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
-#endif
-
-/* GetModuleGlobalName.proto */
-#if CYTHON_USE_DICT_VERSIONS
-#define __Pyx_GetModuleGlobalName(var, name) {\
- static PY_UINT64_T __pyx_dict_version = 0;\
- static PyObject *__pyx_dict_cached_value = NULL;\
- (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
- (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
- __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
-}
-#define __Pyx_GetModuleGlobalNameUncached(var, name) {\
- PY_UINT64_T __pyx_dict_version;\
- PyObject *__pyx_dict_cached_value;\
- (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
-}
-static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
-#else
-#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
-#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
-static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
-#endif
-
-/* RaiseTooManyValuesToUnpack.proto */
-static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
-
-/* RaiseNeedMoreValuesToUnpack.proto */
-static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
-
-/* RaiseNoneIterError.proto */
-static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
-
-/* ExtTypeTest.proto */
-static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
-
-/* GetTopmostException.proto */
-#if CYTHON_USE_EXC_INFO_STACK
-static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
-#endif
-
-/* SaveResetException.proto */
-#if CYTHON_FAST_THREAD_STATE
-#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
-static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
-#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
-static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
-#else
-#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
-#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
-#endif
-
-/* GetException.proto */
-#if CYTHON_FAST_THREAD_STATE
-#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
-static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
-#else
-static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
-#endif
-
-/* SwapException.proto */
-#if CYTHON_FAST_THREAD_STATE
-#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
-static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
-#else
-static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
-#endif
-
-/* Import.proto */
-static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
-
-/* FastTypeChecks.proto */
-#if CYTHON_COMPILING_IN_CPYTHON
-#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
-static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
-static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
-static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
-#else
-#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
-#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
-#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
-#endif
-#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
-
-static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
-/* ListCompAppend.proto */
-#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
-static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
- PyListObject* L = (PyListObject*) list;
- Py_ssize_t len = Py_SIZE(list);
- if (likely(L->allocated > len)) {
- Py_INCREF(x);
- PyList_SET_ITEM(list, len, x);
- __Pyx_SET_SIZE(list, len + 1);
- return 0;
- }
- return PyList_Append(list, x);
-}
-#else
-#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
-#endif
-
-/* PyIntBinop.proto */
-#if !CYTHON_COMPILING_IN_PYPY
-static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
-#else
-#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
- (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
-#endif
-
-/* ListExtend.proto */
-static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
-#if CYTHON_COMPILING_IN_CPYTHON
- PyObject* none = _PyList_Extend((PyListObject*)L, v);
- if (unlikely(!none))
- return -1;
- Py_DECREF(none);
- return 0;
-#else
- return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
-#endif
-}
-
-/* ListAppend.proto */
-#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
-static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
- PyListObject* L = (PyListObject*) list;
- Py_ssize_t len = Py_SIZE(list);
- if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
- Py_INCREF(x);
- PyList_SET_ITEM(list, len, x);
- __Pyx_SET_SIZE(list, len + 1);
- return 0;
- }
- return PyList_Append(list, x);
-}
-#else
-#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
-#endif
-
-/* DivInt[long].proto */
-static CYTHON_INLINE long __Pyx_div_long(long, long);
-
-/* PySequenceContains.proto */
-static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
- int result = PySequence_Contains(seq, item);
- return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
-}
-
-/* ImportFrom.proto */
-static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
-
-/* HasAttr.proto */
-static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
-
-/* PyObject_GenericGetAttrNoDict.proto */
-#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
-static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
-#else
-#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
-#endif
-
-/* PyObject_GenericGetAttr.proto */
-#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
-static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
-#else
-#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
-#endif
-
-/* SetVTable.proto */
-static int __Pyx_SetVtable(PyObject *dict, void *vtable);
-
-/* PyObjectGetAttrStrNoError.proto */
-static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
-
-/* SetupReduce.proto */
-static int __Pyx_setup_reduce(PyObject* type_obj);
-
-/* CLineInTraceback.proto */
-#ifdef CYTHON_CLINE_IN_TRACEBACK
-#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
-#else
-static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
-#endif
-
-/* CodeObjectCache.proto */
-typedef struct {
- PyCodeObject* code_object;
- int code_line;
-} __Pyx_CodeObjectCacheEntry;
-struct __Pyx_CodeObjectCache {
- int count;
- int max_count;
- __Pyx_CodeObjectCacheEntry* entries;
-};
-static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
-static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
-static PyCodeObject *__pyx_find_code_object(int code_line);
-static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
-
-/* AddTraceback.proto */
-static void __Pyx_AddTraceback(const char *funcname, int c_line,
- int py_line, const char *filename);
-
-#if PY_MAJOR_VERSION < 3
- static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
- static void __Pyx_ReleaseBuffer(Py_buffer *view);
-#else
- #define __Pyx_GetBuffer PyObject_GetBuffer
- #define __Pyx_ReleaseBuffer PyBuffer_Release
-#endif
-
-
-/* BufferStructDeclare.proto */
-typedef struct {
- Py_ssize_t shape, strides, suboffsets;
-} __Pyx_Buf_DimInfo;
-typedef struct {
- size_t refcount;
- Py_buffer pybuffer;
-} __Pyx_Buffer;
-typedef struct {
- __Pyx_Buffer *rcbuffer;
- char *data;
- __Pyx_Buf_DimInfo diminfo[8];
-} __Pyx_LocalBuf_ND;
-
-/* MemviewSliceIsContig.proto */
-static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim);
-
-/* OverlappingSlices.proto */
-static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
- __Pyx_memviewslice *slice2,
- int ndim, size_t itemsize);
-
-/* Capsule.proto */
-static CYTHON_INLINE PyObject *__pyx_capsule_create(void *p, const char *sig);
-
-/* IsLittleEndian.proto */
-static CYTHON_INLINE int __Pyx_Is_Little_Endian(void);
-
-/* BufferFormatCheck.proto */
-static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);
-static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
- __Pyx_BufFmt_StackElem* stack,
- __Pyx_TypeInfo* type);
-
-/* TypeInfoCompare.proto */
-static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b);
-
-/* MemviewSliceValidateAndInit.proto */
-static int __Pyx_ValidateAndInit_memviewslice(
- int *axes_specs,
- int c_or_f_flag,
- int buf_flags,
- int ndim,
- __Pyx_TypeInfo *dtype,
- __Pyx_BufFmt_StackElem stack[],
- __Pyx_memviewslice *memviewslice,
- PyObject *original_obj);
-
-/* ObjectToMemviewSlice.proto */
-static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_d_dc_int(PyObject *, int writable_flag);
-
-/* ObjectToMemviewSlice.proto */
-static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_d_dc_float(PyObject *, int writable_flag);
-
-/* ObjectToMemviewSlice.proto */
-static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_int(PyObject *, int writable_flag);
-
-/* GCCDiagnostics.proto */
-#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
-#define __Pyx_HAS_GCC_DIAGNOSTIC
-#endif
-
-/* MemviewSliceCopyTemplate.proto */
-static __Pyx_memviewslice
-__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
- const char *mode, int ndim,
- size_t sizeof_dtype, int contig_flag,
- int dtype_is_object);
-
-/* CIntToPy.proto */
-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
-
-/* CIntFromPy.proto */
-static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
-
-/* CIntToPy.proto */
-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
-
-/* CIntFromPy.proto */
-static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
-
-/* CIntFromPy.proto */
-static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);
-
-/* CheckBinaryVersion.proto */
-static int __Pyx_check_binary_version(void);
-
-/* InitStrings.proto */
-static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
-
-static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
-static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
-static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
-static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
-static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value); /* proto*/
-static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/
-static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
-static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
-static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
-static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
-
-/* Module declarations from 'cython.view' */
-
-/* Module declarations from 'cython' */
-
-/* Module declarations from 'monotonic_align.core' */
-static PyTypeObject *__pyx_array_type = 0;
-static PyTypeObject *__pyx_MemviewEnum_type = 0;
-static PyTypeObject *__pyx_memoryview_type = 0;
-static PyTypeObject *__pyx_memoryviewslice_type = 0;
-static PyObject *generic = 0;
-static PyObject *strided = 0;
-static PyObject *indirect = 0;
-static PyObject *contiguous = 0;
-static PyObject *indirect_contiguous = 0;
-static int __pyx_memoryview_thread_locks_used;
-static PyThread_type_lock __pyx_memoryview_thread_locks[8];
-static void __pyx_f_15monotonic_align_4core_maximum_path_each(__Pyx_memviewslice, __Pyx_memviewslice, int, int, struct __pyx_opt_args_15monotonic_align_4core_maximum_path_each *__pyx_optional_args); /*proto*/
-static void __pyx_f_15monotonic_align_4core_maximum_path_c(__Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int __pyx_skip_dispatch); /*proto*/
-static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
-static void *__pyx_align_pointer(void *, size_t); /*proto*/
-static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/
-static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/
-static PyObject *_unellipsify(PyObject *, int); /*proto*/
-static PyObject *assert_direct_dimensions(Py_ssize_t *, int); /*proto*/
-static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/
-static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int, int); /*proto*/
-static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/
-static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/
-static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/
-static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
-static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
-static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/
-static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
-static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/
-static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/
-static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/
-static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/
-static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/
-static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/
-static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/
-static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/
-static int __pyx_memoryview_err_dim(PyObject *, char *, int); /*proto*/
-static int __pyx_memoryview_err(PyObject *, char *); /*proto*/
-static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/
-static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/
-static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/
-static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
-static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
-static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/
-static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
-static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/
-static __Pyx_TypeInfo __Pyx_TypeInfo_int = { "int", NULL, sizeof(int), { 0 }, 0, IS_UNSIGNED(int) ? 'U' : 'I', IS_UNSIGNED(int), 0 };
-static __Pyx_TypeInfo __Pyx_TypeInfo_float = { "float", NULL, sizeof(float), { 0 }, 0, 'R', 0, 0 };
-#define __Pyx_MODULE_NAME "monotonic_align.core"
-extern int __pyx_module_is_main_monotonic_align__core;
-int __pyx_module_is_main_monotonic_align__core = 0;
-
-/* Implementation of 'monotonic_align.core' */
-static PyObject *__pyx_builtin_range;
-static PyObject *__pyx_builtin_ValueError;
-static PyObject *__pyx_builtin_MemoryError;
-static PyObject *__pyx_builtin_enumerate;
-static PyObject *__pyx_builtin_TypeError;
-static PyObject *__pyx_builtin_Ellipsis;
-static PyObject *__pyx_builtin_id;
-static PyObject *__pyx_builtin_IndexError;
-static const char __pyx_k_O[] = "O";
-static const char __pyx_k_c[] = "c";
-static const char __pyx_k_id[] = "id";
-static const char __pyx_k_new[] = "__new__";
-static const char __pyx_k_obj[] = "obj";
-static const char __pyx_k_base[] = "base";
-static const char __pyx_k_dict[] = "__dict__";
-static const char __pyx_k_main[] = "__main__";
-static const char __pyx_k_mode[] = "mode";
-static const char __pyx_k_name[] = "name";
-static const char __pyx_k_ndim[] = "ndim";
-static const char __pyx_k_pack[] = "pack";
-static const char __pyx_k_size[] = "size";
-static const char __pyx_k_step[] = "step";
-static const char __pyx_k_stop[] = "stop";
-static const char __pyx_k_t_xs[] = "t_xs";
-static const char __pyx_k_t_ys[] = "t_ys";
-static const char __pyx_k_test[] = "__test__";
-static const char __pyx_k_ASCII[] = "ASCII";
-static const char __pyx_k_class[] = "__class__";
-static const char __pyx_k_error[] = "error";
-static const char __pyx_k_flags[] = "flags";
-static const char __pyx_k_paths[] = "paths";
-static const char __pyx_k_range[] = "range";
-static const char __pyx_k_shape[] = "shape";
-static const char __pyx_k_start[] = "start";
-static const char __pyx_k_encode[] = "encode";
-static const char __pyx_k_format[] = "format";
-static const char __pyx_k_import[] = "__import__";
-static const char __pyx_k_name_2[] = "__name__";
-static const char __pyx_k_pickle[] = "pickle";
-static const char __pyx_k_reduce[] = "__reduce__";
-static const char __pyx_k_struct[] = "struct";
-static const char __pyx_k_unpack[] = "unpack";
-static const char __pyx_k_update[] = "update";
-static const char __pyx_k_values[] = "values";
-static const char __pyx_k_fortran[] = "fortran";
-static const char __pyx_k_memview[] = "memview";
-static const char __pyx_k_Ellipsis[] = "Ellipsis";
-static const char __pyx_k_getstate[] = "__getstate__";
-static const char __pyx_k_itemsize[] = "itemsize";
-static const char __pyx_k_pyx_type[] = "__pyx_type";
-static const char __pyx_k_setstate[] = "__setstate__";
-static const char __pyx_k_TypeError[] = "TypeError";
-static const char __pyx_k_enumerate[] = "enumerate";
-static const char __pyx_k_pyx_state[] = "__pyx_state";
-static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
-static const char __pyx_k_IndexError[] = "IndexError";
-static const char __pyx_k_ValueError[] = "ValueError";
-static const char __pyx_k_pyx_result[] = "__pyx_result";
-static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
-static const char __pyx_k_MemoryError[] = "MemoryError";
-static const char __pyx_k_PickleError[] = "PickleError";
-static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
-static const char __pyx_k_stringsource[] = "stringsource";
-static const char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer";
-static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
-static const char __pyx_k_View_MemoryView[] = "View.MemoryView";
-static const char __pyx_k_allocate_buffer[] = "allocate_buffer";
-static const char __pyx_k_dtype_is_object[] = "dtype_is_object";
-static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
-static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
-static const char __pyx_k_pyx_unpickle_Enum[] = "__pyx_unpickle_Enum";
-static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
-static const char __pyx_k_strided_and_direct[] = "";
-static const char __pyx_k_strided_and_indirect[] = "";
-static const char __pyx_k_contiguous_and_direct[] = "";
-static const char __pyx_k_MemoryView_of_r_object[] = "";
-static const char __pyx_k_MemoryView_of_r_at_0x_x[] = "";
-static const char __pyx_k_contiguous_and_indirect[] = "";
-static const char __pyx_k_Cannot_index_with_type_s[] = "Cannot index with type '%s'";
-static const char __pyx_k_Invalid_shape_in_axis_d_d[] = "Invalid shape in axis %d: %d.";
-static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array";
-static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
-static const char __pyx_k_strided_and_direct_or_indirect[] = "";
-static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides";
-static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory.";
-static const char __pyx_k_Cannot_assign_to_read_only_memor[] = "Cannot assign to read-only memoryview";
-static const char __pyx_k_Cannot_create_writable_memory_vi[] = "Cannot create writable memory view from read-only memoryview";
-static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array";
-static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))";
-static const char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported";
-static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got %s";
-static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis %d)";
-static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object";
-static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension %d (got %d and %d)";
-static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
-static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides.";
-static PyObject *__pyx_n_s_ASCII;
-static PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;
-static PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is;
-static PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor;
-static PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi;
-static PyObject *__pyx_kp_s_Cannot_index_with_type_s;
-static PyObject *__pyx_n_s_Ellipsis;
-static PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr;
-static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
-static PyObject *__pyx_n_s_IndexError;
-static PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte;
-static PyObject *__pyx_kp_s_Invalid_mode_expected_c_or_fortr;
-static PyObject *__pyx_kp_s_Invalid_shape_in_axis_d_d;
-static PyObject *__pyx_n_s_MemoryError;
-static PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x;
-static PyObject *__pyx_kp_s_MemoryView_of_r_object;
-static PyObject *__pyx_n_b_O;
-static PyObject *__pyx_kp_s_Out_of_bounds_on_buffer_access_a;
-static PyObject *__pyx_n_s_PickleError;
-static PyObject *__pyx_n_s_TypeError;
-static PyObject *__pyx_kp_s_Unable_to_convert_item_to_object;
-static PyObject *__pyx_n_s_ValueError;
-static PyObject *__pyx_n_s_View_MemoryView;
-static PyObject *__pyx_n_s_allocate_buffer;
-static PyObject *__pyx_n_s_base;
-static PyObject *__pyx_n_s_c;
-static PyObject *__pyx_n_u_c;
-static PyObject *__pyx_n_s_class;
-static PyObject *__pyx_n_s_cline_in_traceback;
-static PyObject *__pyx_kp_s_contiguous_and_direct;
-static PyObject *__pyx_kp_s_contiguous_and_indirect;
-static PyObject *__pyx_n_s_dict;
-static PyObject *__pyx_n_s_dtype_is_object;
-static PyObject *__pyx_n_s_encode;
-static PyObject *__pyx_n_s_enumerate;
-static PyObject *__pyx_n_s_error;
-static PyObject *__pyx_n_s_flags;
-static PyObject *__pyx_n_s_format;
-static PyObject *__pyx_n_s_fortran;
-static PyObject *__pyx_n_u_fortran;
-static PyObject *__pyx_n_s_getstate;
-static PyObject *__pyx_kp_s_got_differing_extents_in_dimensi;
-static PyObject *__pyx_n_s_id;
-static PyObject *__pyx_n_s_import;
-static PyObject *__pyx_n_s_itemsize;
-static PyObject *__pyx_kp_s_itemsize_0_for_cython_array;
-static PyObject *__pyx_n_s_main;
-static PyObject *__pyx_n_s_memview;
-static PyObject *__pyx_n_s_mode;
-static PyObject *__pyx_n_s_name;
-static PyObject *__pyx_n_s_name_2;
-static PyObject *__pyx_n_s_ndim;
-static PyObject *__pyx_n_s_new;
-static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
-static PyObject *__pyx_n_s_obj;
-static PyObject *__pyx_n_s_pack;
-static PyObject *__pyx_n_s_paths;
-static PyObject *__pyx_n_s_pickle;
-static PyObject *__pyx_n_s_pyx_PickleError;
-static PyObject *__pyx_n_s_pyx_checksum;
-static PyObject *__pyx_n_s_pyx_getbuffer;
-static PyObject *__pyx_n_s_pyx_result;
-static PyObject *__pyx_n_s_pyx_state;
-static PyObject *__pyx_n_s_pyx_type;
-static PyObject *__pyx_n_s_pyx_unpickle_Enum;
-static PyObject *__pyx_n_s_pyx_vtable;
-static PyObject *__pyx_n_s_range;
-static PyObject *__pyx_n_s_reduce;
-static PyObject *__pyx_n_s_reduce_cython;
-static PyObject *__pyx_n_s_reduce_ex;
-static PyObject *__pyx_n_s_setstate;
-static PyObject *__pyx_n_s_setstate_cython;
-static PyObject *__pyx_n_s_shape;
-static PyObject *__pyx_n_s_size;
-static PyObject *__pyx_n_s_start;
-static PyObject *__pyx_n_s_step;
-static PyObject *__pyx_n_s_stop;
-static PyObject *__pyx_kp_s_strided_and_direct;
-static PyObject *__pyx_kp_s_strided_and_direct_or_indirect;
-static PyObject *__pyx_kp_s_strided_and_indirect;
-static PyObject *__pyx_kp_s_stringsource;
-static PyObject *__pyx_n_s_struct;
-static PyObject *__pyx_n_s_t_xs;
-static PyObject *__pyx_n_s_t_ys;
-static PyObject *__pyx_n_s_test;
-static PyObject *__pyx_kp_s_unable_to_allocate_array_data;
-static PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str;
-static PyObject *__pyx_n_s_unpack;
-static PyObject *__pyx_n_s_update;
-static PyObject *__pyx_n_s_values;
-static PyObject *__pyx_pf_15monotonic_align_4core_maximum_path_c(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_paths, __Pyx_memviewslice __pyx_v_values, __Pyx_memviewslice __pyx_v_t_ys, __Pyx_memviewslice __pyx_v_t_xs); /* proto */
-static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */
-static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
-static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
-static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
-static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
-static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */
-static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
-static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
-static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
-static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */
-static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
-static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
-static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
-static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
-static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_int_0;
-static PyObject *__pyx_int_1;
-static PyObject *__pyx_int_112105877;
-static PyObject *__pyx_int_136983863;
-static PyObject *__pyx_int_184977713;
-static PyObject *__pyx_int_neg_1;
-static float __pyx_k_;
-static PyObject *__pyx_tuple__2;
-static PyObject *__pyx_tuple__3;
-static PyObject *__pyx_tuple__4;
-static PyObject *__pyx_tuple__5;
-static PyObject *__pyx_tuple__6;
-static PyObject *__pyx_tuple__7;
-static PyObject *__pyx_tuple__8;
-static PyObject *__pyx_tuple__9;
-static PyObject *__pyx_slice__16;
-static PyObject *__pyx_tuple__10;
-static PyObject *__pyx_tuple__11;
-static PyObject *__pyx_tuple__12;
-static PyObject *__pyx_tuple__13;
-static PyObject *__pyx_tuple__14;
-static PyObject *__pyx_tuple__15;
-static PyObject *__pyx_tuple__17;
-static PyObject *__pyx_tuple__18;
-static PyObject *__pyx_tuple__19;
-static PyObject *__pyx_tuple__20;
-static PyObject *__pyx_tuple__21;
-static PyObject *__pyx_tuple__22;
-static PyObject *__pyx_tuple__23;
-static PyObject *__pyx_tuple__24;
-static PyObject *__pyx_tuple__25;
-static PyObject *__pyx_tuple__26;
-static PyObject *__pyx_codeobj__27;
-/* Late includes */
-
-/* "monotonic_align/core.pyx":7
- * @cython.boundscheck(False)
- * @cython.wraparound(False)
- * cdef void maximum_path_each(int[:,::1] path, float[:,::1] value, int t_y, int t_x, float max_neg_val=-1e9) nogil: # <<<<<<<<<<<<<<
- * cdef int x
- * cdef int y
- */
-
-static void __pyx_f_15monotonic_align_4core_maximum_path_each(__Pyx_memviewslice __pyx_v_path, __Pyx_memviewslice __pyx_v_value, int __pyx_v_t_y, int __pyx_v_t_x, struct __pyx_opt_args_15monotonic_align_4core_maximum_path_each *__pyx_optional_args) {
- float __pyx_v_max_neg_val = __pyx_k_;
- int __pyx_v_x;
- int __pyx_v_y;
- float __pyx_v_v_prev;
- float __pyx_v_v_cur;
- int __pyx_v_index;
- int __pyx_t_1;
- int __pyx_t_2;
- int __pyx_t_3;
- long __pyx_t_4;
- int __pyx_t_5;
- long __pyx_t_6;
- long __pyx_t_7;
- int __pyx_t_8;
- Py_ssize_t __pyx_t_9;
- Py_ssize_t __pyx_t_10;
- float __pyx_t_11;
- float __pyx_t_12;
- float __pyx_t_13;
- int __pyx_t_14;
- Py_ssize_t __pyx_t_15;
- Py_ssize_t __pyx_t_16;
- if (__pyx_optional_args) {
- if (__pyx_optional_args->__pyx_n > 0) {
- __pyx_v_max_neg_val = __pyx_optional_args->max_neg_val;
- }
- }
-
- /* "monotonic_align/core.pyx":13
- * cdef float v_cur
- * cdef float tmp
- * cdef int index = t_x - 1 # <<<<<<<<<<<<<<
- *
- * for y in range(t_y):
- */
- __pyx_v_index = (__pyx_v_t_x - 1);
-
- /* "monotonic_align/core.pyx":15
- * cdef int index = t_x - 1
- *
- * for y in range(t_y): # <<<<<<<<<<<<<<
- * for x in range(max(0, t_x + y - t_y), min(t_x, y + 1)):
- * if x == y:
- */
- __pyx_t_1 = __pyx_v_t_y;
- __pyx_t_2 = __pyx_t_1;
- for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
- __pyx_v_y = __pyx_t_3;
-
- /* "monotonic_align/core.pyx":16
- *
- * for y in range(t_y):
- * for x in range(max(0, t_x + y - t_y), min(t_x, y + 1)): # <<<<<<<<<<<<<<
- * if x == y:
- * v_cur = max_neg_val
- */
- __pyx_t_4 = (__pyx_v_y + 1);
- __pyx_t_5 = __pyx_v_t_x;
- if (((__pyx_t_4 < __pyx_t_5) != 0)) {
- __pyx_t_6 = __pyx_t_4;
- } else {
- __pyx_t_6 = __pyx_t_5;
- }
- __pyx_t_4 = __pyx_t_6;
- __pyx_t_5 = ((__pyx_v_t_x + __pyx_v_y) - __pyx_v_t_y);
- __pyx_t_6 = 0;
- if (((__pyx_t_5 > __pyx_t_6) != 0)) {
- __pyx_t_7 = __pyx_t_5;
- } else {
- __pyx_t_7 = __pyx_t_6;
- }
- __pyx_t_6 = __pyx_t_4;
- for (__pyx_t_5 = __pyx_t_7; __pyx_t_5 < __pyx_t_6; __pyx_t_5+=1) {
- __pyx_v_x = __pyx_t_5;
-
- /* "monotonic_align/core.pyx":17
- * for y in range(t_y):
- * for x in range(max(0, t_x + y - t_y), min(t_x, y + 1)):
- * if x == y: # <<<<<<<<<<<<<<
- * v_cur = max_neg_val
- * else:
- */
- __pyx_t_8 = ((__pyx_v_x == __pyx_v_y) != 0);
- if (__pyx_t_8) {
-
- /* "monotonic_align/core.pyx":18
- * for x in range(max(0, t_x + y - t_y), min(t_x, y + 1)):
- * if x == y:
- * v_cur = max_neg_val # <<<<<<<<<<<<<<
- * else:
- * v_cur = value[y-1, x]
- */
- __pyx_v_v_cur = __pyx_v_max_neg_val;
-
- /* "monotonic_align/core.pyx":17
- * for y in range(t_y):
- * for x in range(max(0, t_x + y - t_y), min(t_x, y + 1)):
- * if x == y: # <<<<<<<<<<<<<<
- * v_cur = max_neg_val
- * else:
- */
- goto __pyx_L7;
- }
-
- /* "monotonic_align/core.pyx":20
- * v_cur = max_neg_val
- * else:
- * v_cur = value[y-1, x] # <<<<<<<<<<<<<<
- * if x == 0:
- * if y == 0:
- */
- /*else*/ {
- __pyx_t_9 = (__pyx_v_y - 1);
- __pyx_t_10 = __pyx_v_x;
- __pyx_v_v_cur = (*((float *) ( /* dim=1 */ ((char *) (((float *) ( /* dim=0 */ (__pyx_v_value.data + __pyx_t_9 * __pyx_v_value.strides[0]) )) + __pyx_t_10)) )));
- }
- __pyx_L7:;
-
- /* "monotonic_align/core.pyx":21
- * else:
- * v_cur = value[y-1, x]
- * if x == 0: # <<<<<<<<<<<<<<
- * if y == 0:
- * v_prev = 0.
- */
- __pyx_t_8 = ((__pyx_v_x == 0) != 0);
- if (__pyx_t_8) {
-
- /* "monotonic_align/core.pyx":22
- * v_cur = value[y-1, x]
- * if x == 0:
- * if y == 0: # <<<<<<<<<<<<<<
- * v_prev = 0.
- * else:
- */
- __pyx_t_8 = ((__pyx_v_y == 0) != 0);
- if (__pyx_t_8) {
-
- /* "monotonic_align/core.pyx":23
- * if x == 0:
- * if y == 0:
- * v_prev = 0. # <<<<<<<<<<<<<<
- * else:
- * v_prev = max_neg_val
- */
- __pyx_v_v_prev = 0.;
-
- /* "monotonic_align/core.pyx":22
- * v_cur = value[y-1, x]
- * if x == 0:
- * if y == 0: # <<<<<<<<<<<<<<
- * v_prev = 0.
- * else:
- */
- goto __pyx_L9;
- }
-
- /* "monotonic_align/core.pyx":25
- * v_prev = 0.
- * else:
- * v_prev = max_neg_val # <<<<<<<<<<<<<<
- * else:
- * v_prev = value[y-1, x-1]
- */
- /*else*/ {
- __pyx_v_v_prev = __pyx_v_max_neg_val;
- }
- __pyx_L9:;
-
- /* "monotonic_align/core.pyx":21
- * else:
- * v_cur = value[y-1, x]
- * if x == 0: # <<<<<<<<<<<<<<
- * if y == 0:
- * v_prev = 0.
- */
- goto __pyx_L8;
- }
-
- /* "monotonic_align/core.pyx":27
- * v_prev = max_neg_val
- * else:
- * v_prev = value[y-1, x-1] # <<<<<<<<<<<<<<
- * value[y, x] += max(v_prev, v_cur)
- *
- */
- /*else*/ {
- __pyx_t_10 = (__pyx_v_y - 1);
- __pyx_t_9 = (__pyx_v_x - 1);
- __pyx_v_v_prev = (*((float *) ( /* dim=1 */ ((char *) (((float *) ( /* dim=0 */ (__pyx_v_value.data + __pyx_t_10 * __pyx_v_value.strides[0]) )) + __pyx_t_9)) )));
- }
- __pyx_L8:;
-
- /* "monotonic_align/core.pyx":28
- * else:
- * v_prev = value[y-1, x-1]
- * value[y, x] += max(v_prev, v_cur) # <<<<<<<<<<<<<<
- *
- * for y in range(t_y - 1, -1, -1):
- */
- __pyx_t_11 = __pyx_v_v_cur;
- __pyx_t_12 = __pyx_v_v_prev;
- if (((__pyx_t_11 > __pyx_t_12) != 0)) {
- __pyx_t_13 = __pyx_t_11;
- } else {
- __pyx_t_13 = __pyx_t_12;
- }
- __pyx_t_9 = __pyx_v_y;
- __pyx_t_10 = __pyx_v_x;
- *((float *) ( /* dim=1 */ ((char *) (((float *) ( /* dim=0 */ (__pyx_v_value.data + __pyx_t_9 * __pyx_v_value.strides[0]) )) + __pyx_t_10)) )) += __pyx_t_13;
- }
- }
-
- /* "monotonic_align/core.pyx":30
- * value[y, x] += max(v_prev, v_cur)
- *
- * for y in range(t_y - 1, -1, -1): # <<<<<<<<<<<<<<
- * path[y, index] = 1
- * if index != 0 and (index == y or value[y-1, index] < value[y-1, index-1]):
- */
- for (__pyx_t_1 = (__pyx_v_t_y - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
- __pyx_v_y = __pyx_t_1;
-
- /* "monotonic_align/core.pyx":31
- *
- * for y in range(t_y - 1, -1, -1):
- * path[y, index] = 1 # <<<<<<<<<<<<<<
- * if index != 0 and (index == y or value[y-1, index] < value[y-1, index-1]):
- * index = index - 1
- */
- __pyx_t_10 = __pyx_v_y;
- __pyx_t_9 = __pyx_v_index;
- *((int *) ( /* dim=1 */ ((char *) (((int *) ( /* dim=0 */ (__pyx_v_path.data + __pyx_t_10 * __pyx_v_path.strides[0]) )) + __pyx_t_9)) )) = 1;
-
- /* "monotonic_align/core.pyx":32
- * for y in range(t_y - 1, -1, -1):
- * path[y, index] = 1
- * if index != 0 and (index == y or value[y-1, index] < value[y-1, index-1]): # <<<<<<<<<<<<<<
- * index = index - 1
- *
- */
- __pyx_t_14 = ((__pyx_v_index != 0) != 0);
- if (__pyx_t_14) {
- } else {
- __pyx_t_8 = __pyx_t_14;
- goto __pyx_L13_bool_binop_done;
- }
- __pyx_t_14 = ((__pyx_v_index == __pyx_v_y) != 0);
- if (!__pyx_t_14) {
- } else {
- __pyx_t_8 = __pyx_t_14;
- goto __pyx_L13_bool_binop_done;
- }
- __pyx_t_9 = (__pyx_v_y - 1);
- __pyx_t_10 = __pyx_v_index;
- __pyx_t_15 = (__pyx_v_y - 1);
- __pyx_t_16 = (__pyx_v_index - 1);
- __pyx_t_14 = (((*((float *) ( /* dim=1 */ ((char *) (((float *) ( /* dim=0 */ (__pyx_v_value.data + __pyx_t_9 * __pyx_v_value.strides[0]) )) + __pyx_t_10)) ))) < (*((float *) ( /* dim=1 */ ((char *) (((float *) ( /* dim=0 */ (__pyx_v_value.data + __pyx_t_15 * __pyx_v_value.strides[0]) )) + __pyx_t_16)) )))) != 0);
- __pyx_t_8 = __pyx_t_14;
- __pyx_L13_bool_binop_done:;
- if (__pyx_t_8) {
-
- /* "monotonic_align/core.pyx":33
- * path[y, index] = 1
- * if index != 0 and (index == y or value[y-1, index] < value[y-1, index-1]):
- * index = index - 1 # <<<<<<<<<<<<<<
- *
- *
- */
- __pyx_v_index = (__pyx_v_index - 1);
-
- /* "monotonic_align/core.pyx":32
- * for y in range(t_y - 1, -1, -1):
- * path[y, index] = 1
- * if index != 0 and (index == y or value[y-1, index] < value[y-1, index-1]): # <<<<<<<<<<<<<<
- * index = index - 1
- *
- */
- }
- }
-
- /* "monotonic_align/core.pyx":7
- * @cython.boundscheck(False)
- * @cython.wraparound(False)
- * cdef void maximum_path_each(int[:,::1] path, float[:,::1] value, int t_y, int t_x, float max_neg_val=-1e9) nogil: # <<<<<<<<<<<<<<
- * cdef int x
- * cdef int y
- */
-
- /* function exit code */
-}
-
-/* "monotonic_align/core.pyx":38
- * @cython.boundscheck(False)
- * @cython.wraparound(False)
- * cpdef void maximum_path_c(int[:,:,::1] paths, float[:,:,::1] values, int[::1] t_ys, int[::1] t_xs) nogil: # <<<<<<<<<<<<<<
- * cdef int b = paths.shape[0]
- * cdef int i
- */
-
-static PyObject *__pyx_pw_15monotonic_align_4core_1maximum_path_c(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static void __pyx_f_15monotonic_align_4core_maximum_path_c(__Pyx_memviewslice __pyx_v_paths, __Pyx_memviewslice __pyx_v_values, __Pyx_memviewslice __pyx_v_t_ys, __Pyx_memviewslice __pyx_v_t_xs, CYTHON_UNUSED int __pyx_skip_dispatch) {
- CYTHON_UNUSED int __pyx_v_b;
- int __pyx_v_i;
- int __pyx_t_1;
- int __pyx_t_2;
- int __pyx_t_3;
- __Pyx_memviewslice __pyx_t_4 = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_t_5 = { 0, 0, { 0 }, { 0 }, { 0 } };
- Py_ssize_t __pyx_t_6;
- Py_ssize_t __pyx_t_7;
-
- /* "monotonic_align/core.pyx":39
- * @cython.wraparound(False)
- * cpdef void maximum_path_c(int[:,:,::1] paths, float[:,:,::1] values, int[::1] t_ys, int[::1] t_xs) nogil:
- * cdef int b = paths.shape[0] # <<<<<<<<<<<<<<
- * cdef int i
- * for i in prange(b, nogil=True):
- */
- __pyx_v_b = (__pyx_v_paths.shape[0]);
-
- /* "monotonic_align/core.pyx":41
- * cdef int b = paths.shape[0]
- * cdef int i
- * for i in prange(b, nogil=True): # <<<<<<<<<<<<<<
- * maximum_path_each(paths[i], values[i], t_ys[i], t_xs[i])
- */
- {
- #ifdef WITH_THREAD
- PyThreadState *_save;
- Py_UNBLOCK_THREADS
- __Pyx_FastGIL_Remember();
- #endif
- /*try:*/ {
- __pyx_t_1 = __pyx_v_b;
- if ((1 == 0)) abort();
- {
- #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
- #undef likely
- #undef unlikely
- #define likely(x) (x)
- #define unlikely(x) (x)
- #endif
- __pyx_t_3 = (__pyx_t_1 - 0 + 1 - 1/abs(1)) / 1;
- if (__pyx_t_3 > 0)
- {
- #ifdef _OPENMP
- #pragma omp parallel private(__pyx_t_6, __pyx_t_7) firstprivate(__pyx_t_4, __pyx_t_5)
- #endif /* _OPENMP */
- {
- #ifdef _OPENMP
- #pragma omp for firstprivate(__pyx_v_i) lastprivate(__pyx_v_i)
- #endif /* _OPENMP */
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_3; __pyx_t_2++){
- {
- __pyx_v_i = (int)(0 + 1 * __pyx_t_2);
-
- /* "monotonic_align/core.pyx":42
- * cdef int i
- * for i in prange(b, nogil=True):
- * maximum_path_each(paths[i], values[i], t_ys[i], t_xs[i]) # <<<<<<<<<<<<<<
- */
- __pyx_t_4.data = __pyx_v_paths.data;
- __pyx_t_4.memview = __pyx_v_paths.memview;
- __PYX_INC_MEMVIEW(&__pyx_t_4, 0);
- {
- Py_ssize_t __pyx_tmp_idx = __pyx_v_i;
- Py_ssize_t __pyx_tmp_stride = __pyx_v_paths.strides[0];
- __pyx_t_4.data += __pyx_tmp_idx * __pyx_tmp_stride;
-}
-
-__pyx_t_4.shape[0] = __pyx_v_paths.shape[1];
-__pyx_t_4.strides[0] = __pyx_v_paths.strides[1];
- __pyx_t_4.suboffsets[0] = -1;
-
-__pyx_t_4.shape[1] = __pyx_v_paths.shape[2];
-__pyx_t_4.strides[1] = __pyx_v_paths.strides[2];
- __pyx_t_4.suboffsets[1] = -1;
-
-__pyx_t_5.data = __pyx_v_values.data;
- __pyx_t_5.memview = __pyx_v_values.memview;
- __PYX_INC_MEMVIEW(&__pyx_t_5, 0);
- {
- Py_ssize_t __pyx_tmp_idx = __pyx_v_i;
- Py_ssize_t __pyx_tmp_stride = __pyx_v_values.strides[0];
- __pyx_t_5.data += __pyx_tmp_idx * __pyx_tmp_stride;
-}
-
-__pyx_t_5.shape[0] = __pyx_v_values.shape[1];
-__pyx_t_5.strides[0] = __pyx_v_values.strides[1];
- __pyx_t_5.suboffsets[0] = -1;
-
-__pyx_t_5.shape[1] = __pyx_v_values.shape[2];
-__pyx_t_5.strides[1] = __pyx_v_values.strides[2];
- __pyx_t_5.suboffsets[1] = -1;
-
-__pyx_t_6 = __pyx_v_i;
- __pyx_t_7 = __pyx_v_i;
- __pyx_f_15monotonic_align_4core_maximum_path_each(__pyx_t_4, __pyx_t_5, (*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_t_ys.data) + __pyx_t_6)) ))), (*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_t_xs.data) + __pyx_t_7)) ))), NULL);
- __PYX_XDEC_MEMVIEW(&__pyx_t_4, 0);
- __pyx_t_4.memview = NULL;
- __pyx_t_4.data = NULL;
- __PYX_XDEC_MEMVIEW(&__pyx_t_5, 0);
- __pyx_t_5.memview = NULL;
- __pyx_t_5.data = NULL;
- }
- }
- }
- }
- }
- #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
- #undef likely
- #undef unlikely
- #define likely(x) __builtin_expect(!!(x), 1)
- #define unlikely(x) __builtin_expect(!!(x), 0)
- #endif
- }
-
- /* "monotonic_align/core.pyx":41
- * cdef int b = paths.shape[0]
- * cdef int i
- * for i in prange(b, nogil=True): # <<<<<<<<<<<<<<
- * maximum_path_each(paths[i], values[i], t_ys[i], t_xs[i])
- */
- /*finally:*/ {
- /*normal exit:*/{
- #ifdef WITH_THREAD
- __Pyx_FastGIL_Forget();
- Py_BLOCK_THREADS
- #endif
- goto __pyx_L5;
- }
- __pyx_L5:;
- }
- }
-
- /* "monotonic_align/core.pyx":38
- * @cython.boundscheck(False)
- * @cython.wraparound(False)
- * cpdef void maximum_path_c(int[:,:,::1] paths, float[:,:,::1] values, int[::1] t_ys, int[::1] t_xs) nogil: # <<<<<<<<<<<<<<
- * cdef int b = paths.shape[0]
- * cdef int i
- */
-
- /* function exit code */
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_15monotonic_align_4core_1maximum_path_c(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyObject *__pyx_pw_15monotonic_align_4core_1maximum_path_c(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
- __Pyx_memviewslice __pyx_v_paths = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_values = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_t_ys = { 0, 0, { 0 }, { 0 }, { 0 } };
- __Pyx_memviewslice __pyx_v_t_xs = { 0, 0, { 0 }, { 0 }, { 0 } };
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("maximum_path_c (wrapper)", 0);
- {
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_paths,&__pyx_n_s_values,&__pyx_n_s_t_ys,&__pyx_n_s_t_xs,0};
- PyObject* values[4] = {0,0,0,0};
- if (unlikely(__pyx_kwds)) {
- Py_ssize_t kw_args;
- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
- switch (pos_args) {
- case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
- CYTHON_FALLTHROUGH;
- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
- CYTHON_FALLTHROUGH;
- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
- CYTHON_FALLTHROUGH;
- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
- CYTHON_FALLTHROUGH;
- case 0: break;
- default: goto __pyx_L5_argtuple_error;
- }
- kw_args = PyDict_Size(__pyx_kwds);
- switch (pos_args) {
- case 0:
- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_paths)) != 0)) kw_args--;
- else goto __pyx_L5_argtuple_error;
- CYTHON_FALLTHROUGH;
- case 1:
- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
- else {
- __Pyx_RaiseArgtupleInvalid("maximum_path_c", 1, 4, 4, 1); __PYX_ERR(0, 38, __pyx_L3_error)
- }
- CYTHON_FALLTHROUGH;
- case 2:
- if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t_ys)) != 0)) kw_args--;
- else {
- __Pyx_RaiseArgtupleInvalid("maximum_path_c", 1, 4, 4, 2); __PYX_ERR(0, 38, __pyx_L3_error)
- }
- CYTHON_FALLTHROUGH;
- case 3:
- if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t_xs)) != 0)) kw_args--;
- else {
- __Pyx_RaiseArgtupleInvalid("maximum_path_c", 1, 4, 4, 3); __PYX_ERR(0, 38, __pyx_L3_error)
- }
- }
- if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "maximum_path_c") < 0)) __PYX_ERR(0, 38, __pyx_L3_error)
- }
- } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
- goto __pyx_L5_argtuple_error;
- } else {
- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
- values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
- values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
- }
- __pyx_v_paths = __Pyx_PyObject_to_MemoryviewSlice_d_d_dc_int(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_paths.memview)) __PYX_ERR(0, 38, __pyx_L3_error)
- __pyx_v_values = __Pyx_PyObject_to_MemoryviewSlice_d_d_dc_float(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_values.memview)) __PYX_ERR(0, 38, __pyx_L3_error)
- __pyx_v_t_ys = __Pyx_PyObject_to_MemoryviewSlice_dc_int(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_t_ys.memview)) __PYX_ERR(0, 38, __pyx_L3_error)
- __pyx_v_t_xs = __Pyx_PyObject_to_MemoryviewSlice_dc_int(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_t_xs.memview)) __PYX_ERR(0, 38, __pyx_L3_error)
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("maximum_path_c", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 38, __pyx_L3_error)
- __pyx_L3_error:;
- __Pyx_AddTraceback("monotonic_align.core.maximum_path_c", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_15monotonic_align_4core_maximum_path_c(__pyx_self, __pyx_v_paths, __pyx_v_values, __pyx_v_t_ys, __pyx_v_t_xs);
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_15monotonic_align_4core_maximum_path_c(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_paths, __Pyx_memviewslice __pyx_v_values, __Pyx_memviewslice __pyx_v_t_ys, __Pyx_memviewslice __pyx_v_t_xs) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("maximum_path_c", 0);
- __Pyx_XDECREF(__pyx_r);
- if (unlikely(!__pyx_v_paths.memview)) { __Pyx_RaiseUnboundLocalError("paths"); __PYX_ERR(0, 38, __pyx_L1_error) }
- if (unlikely(!__pyx_v_values.memview)) { __Pyx_RaiseUnboundLocalError("values"); __PYX_ERR(0, 38, __pyx_L1_error) }
- if (unlikely(!__pyx_v_t_ys.memview)) { __Pyx_RaiseUnboundLocalError("t_ys"); __PYX_ERR(0, 38, __pyx_L1_error) }
- if (unlikely(!__pyx_v_t_xs.memview)) { __Pyx_RaiseUnboundLocalError("t_xs"); __PYX_ERR(0, 38, __pyx_L1_error) }
- __pyx_t_1 = __Pyx_void_to_None(__pyx_f_15monotonic_align_4core_maximum_path_c(__pyx_v_paths, __pyx_v_values, __pyx_v_t_ys, __pyx_v_t_xs, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("monotonic_align.core.maximum_path_c", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __PYX_XDEC_MEMVIEW(&__pyx_v_paths, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_values, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_t_ys, 1);
- __PYX_XDEC_MEMVIEW(&__pyx_v_t_xs, 1);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":123
- * cdef bint dtype_is_object
- *
- * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
- * mode="c", bint allocate_buffer=True):
- *
- */
-
-/* Python wrapper */
-static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
- PyObject *__pyx_v_shape = 0;
- Py_ssize_t __pyx_v_itemsize;
- PyObject *__pyx_v_format = 0;
- PyObject *__pyx_v_mode = 0;
- int __pyx_v_allocate_buffer;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- int __pyx_r;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
- {
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shape,&__pyx_n_s_itemsize,&__pyx_n_s_format,&__pyx_n_s_mode,&__pyx_n_s_allocate_buffer,0};
- PyObject* values[5] = {0,0,0,0,0};
- values[3] = ((PyObject *)__pyx_n_s_c);
- if (unlikely(__pyx_kwds)) {
- Py_ssize_t kw_args;
- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
- switch (pos_args) {
- case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
- CYTHON_FALLTHROUGH;
- case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
- CYTHON_FALLTHROUGH;
- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
- CYTHON_FALLTHROUGH;
- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
- CYTHON_FALLTHROUGH;
- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
- CYTHON_FALLTHROUGH;
- case 0: break;
- default: goto __pyx_L5_argtuple_error;
- }
- kw_args = PyDict_Size(__pyx_kwds);
- switch (pos_args) {
- case 0:
- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shape)) != 0)) kw_args--;
- else goto __pyx_L5_argtuple_error;
- CYTHON_FALLTHROUGH;
- case 1:
- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_itemsize)) != 0)) kw_args--;
- else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); __PYX_ERR(1, 123, __pyx_L3_error)
- }
- CYTHON_FALLTHROUGH;
- case 2:
- if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--;
- else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); __PYX_ERR(1, 123, __pyx_L3_error)
- }
- CYTHON_FALLTHROUGH;
- case 3:
- if (kw_args > 0) {
- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode);
- if (value) { values[3] = value; kw_args--; }
- }
- CYTHON_FALLTHROUGH;
- case 4:
- if (kw_args > 0) {
- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_allocate_buffer);
- if (value) { values[4] = value; kw_args--; }
- }
- }
- if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 123, __pyx_L3_error)
- }
- } else {
- switch (PyTuple_GET_SIZE(__pyx_args)) {
- case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
- CYTHON_FALLTHROUGH;
- case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
- CYTHON_FALLTHROUGH;
- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
- break;
- default: goto __pyx_L5_argtuple_error;
- }
- }
- __pyx_v_shape = ((PyObject*)values[0]);
- __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 123, __pyx_L3_error)
- __pyx_v_format = values[2];
- __pyx_v_mode = values[3];
- if (values[4]) {
- __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 124, __pyx_L3_error)
- } else {
-
- /* "View.MemoryView":124
- *
- * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,
- * mode="c", bint allocate_buffer=True): # <<<<<<<<<<<<<<
- *
- * cdef int idx
- */
- __pyx_v_allocate_buffer = ((int)1);
- }
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 123, __pyx_L3_error)
- __pyx_L3_error:;
- __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return -1;
- __pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(1, 123, __pyx_L1_error)
- if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) {
- PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(1, 123, __pyx_L1_error)
- }
- __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer);
-
- /* "View.MemoryView":123
- * cdef bint dtype_is_object
- *
- * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
- * mode="c", bint allocate_buffer=True):
- *
- */
-
- /* function exit code */
- goto __pyx_L0;
- __pyx_L1_error:;
- __pyx_r = -1;
- __pyx_L0:;
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer) {
- int __pyx_v_idx;
- Py_ssize_t __pyx_v_i;
- Py_ssize_t __pyx_v_dim;
- PyObject **__pyx_v_p;
- char __pyx_v_order;
- int __pyx_r;
- __Pyx_RefNannyDeclarations
- Py_ssize_t __pyx_t_1;
- int __pyx_t_2;
- PyObject *__pyx_t_3 = NULL;
- int __pyx_t_4;
- PyObject *__pyx_t_5 = NULL;
- PyObject *__pyx_t_6 = NULL;
- char *__pyx_t_7;
- int __pyx_t_8;
- Py_ssize_t __pyx_t_9;
- PyObject *__pyx_t_10 = NULL;
- Py_ssize_t __pyx_t_11;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__cinit__", 0);
- __Pyx_INCREF(__pyx_v_format);
-
- /* "View.MemoryView":130
- * cdef PyObject **p
- *
- * self.ndim = len(shape) # <<<<<<<<<<<<<<
- * self.itemsize = itemsize
- *
- */
- if (unlikely(__pyx_v_shape == Py_None)) {
- PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
- __PYX_ERR(1, 130, __pyx_L1_error)
- }
- __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 130, __pyx_L1_error)
- __pyx_v_self->ndim = ((int)__pyx_t_1);
-
- /* "View.MemoryView":131
- *
- * self.ndim = len(shape)
- * self.itemsize = itemsize # <<<<<<<<<<<<<<
- *
- * if not self.ndim:
- */
- __pyx_v_self->itemsize = __pyx_v_itemsize;
-
- /* "View.MemoryView":133
- * self.itemsize = itemsize
- *
- * if not self.ndim: # <<<<<<<<<<<<<<
- * raise ValueError("Empty shape tuple for cython.array")
- *
- */
- __pyx_t_2 = ((!(__pyx_v_self->ndim != 0)) != 0);
- if (unlikely(__pyx_t_2)) {
-
- /* "View.MemoryView":134
- *
- * if not self.ndim:
- * raise ValueError("Empty shape tuple for cython.array") # <<<<<<<<<<<<<<
- *
- * if itemsize <= 0:
- */
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 134, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(1, 134, __pyx_L1_error)
-
- /* "View.MemoryView":133
- * self.itemsize = itemsize
- *
- * if not self.ndim: # <<<<<<<<<<<<<<
- * raise ValueError("Empty shape tuple for cython.array")
- *
- */
- }
-
- /* "View.MemoryView":136
- * raise ValueError("Empty shape tuple for cython.array")
- *
- * if itemsize <= 0: # <<<<<<<<<<<<<<
- * raise ValueError("itemsize <= 0 for cython.array")
- *
- */
- __pyx_t_2 = ((__pyx_v_itemsize <= 0) != 0);
- if (unlikely(__pyx_t_2)) {
-
- /* "View.MemoryView":137
- *
- * if itemsize <= 0:
- * raise ValueError("itemsize <= 0 for cython.array") # <<<<<<<<<<<<<<
- *
- * if not isinstance(format, bytes):
- */
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 137, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(1, 137, __pyx_L1_error)
-
- /* "View.MemoryView":136
- * raise ValueError("Empty shape tuple for cython.array")
- *
- * if itemsize <= 0: # <<<<<<<<<<<<<<
- * raise ValueError("itemsize <= 0 for cython.array")
- *
- */
- }
-
- /* "View.MemoryView":139
- * raise ValueError("itemsize <= 0 for cython.array")
- *
- * if not isinstance(format, bytes): # <<<<<<<<<<<<<<
- * format = format.encode('ASCII')
- * self._format = format # keep a reference to the byte string
- */
- __pyx_t_2 = PyBytes_Check(__pyx_v_format);
- __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0);
- if (__pyx_t_4) {
-
- /* "View.MemoryView":140
- *
- * if not isinstance(format, bytes):
- * format = format.encode('ASCII') # <<<<<<<<<<<<<<
- * self._format = format # keep a reference to the byte string
- * self.format = self._format
- */
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 140, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = NULL;
- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
- __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
- if (likely(__pyx_t_6)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
- __Pyx_INCREF(__pyx_t_6);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_5, function);
- }
- }
- __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_n_s_ASCII) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_s_ASCII);
- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 140, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_3);
- __pyx_t_3 = 0;
-
- /* "View.MemoryView":139
- * raise ValueError("itemsize <= 0 for cython.array")
- *
- * if not isinstance(format, bytes): # <<<<<<<<<<<<<<
- * format = format.encode('ASCII')
- * self._format = format # keep a reference to the byte string
- */
- }
-
- /* "View.MemoryView":141
- * if not isinstance(format, bytes):
- * format = format.encode('ASCII')
- * self._format = format # keep a reference to the byte string # <<<<<<<<<<<<<<
- * self.format = self._format
- *
- */
- if (!(likely(PyBytes_CheckExact(__pyx_v_format))||((__pyx_v_format) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_format)->tp_name), 0))) __PYX_ERR(1, 141, __pyx_L1_error)
- __pyx_t_3 = __pyx_v_format;
- __Pyx_INCREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_3);
- __Pyx_GOTREF(__pyx_v_self->_format);
- __Pyx_DECREF(__pyx_v_self->_format);
- __pyx_v_self->_format = ((PyObject*)__pyx_t_3);
- __pyx_t_3 = 0;
-
- /* "View.MemoryView":142
- * format = format.encode('ASCII')
- * self._format = format # keep a reference to the byte string
- * self.format = self._format # <<<<<<<<<<<<<<
- *
- *
- */
- if (unlikely(__pyx_v_self->_format == Py_None)) {
- PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
- __PYX_ERR(1, 142, __pyx_L1_error)
- }
- __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(1, 142, __pyx_L1_error)
- __pyx_v_self->format = __pyx_t_7;
-
- /* "View.MemoryView":145
- *
- *
- * self._shape = PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2) # <<<<<<<<<<<<<<
- * self._strides = self._shape + self.ndim
- *
- */
- __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2)));
-
- /* "View.MemoryView":146
- *
- * self._shape = PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)
- * self._strides = self._shape + self.ndim # <<<<<<<<<<<<<<
- *
- * if not self._shape:
- */
- __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim);
-
- /* "View.MemoryView":148
- * self._strides = self._shape + self.ndim
- *
- * if not self._shape: # <<<<<<<<<<<<<<
- * raise MemoryError("unable to allocate shape and strides.")
- *
- */
- __pyx_t_4 = ((!(__pyx_v_self->_shape != 0)) != 0);
- if (unlikely(__pyx_t_4)) {
-
- /* "View.MemoryView":149
- *
- * if not self._shape:
- * raise MemoryError("unable to allocate shape and strides.") # <<<<<<<<<<<<<<
- *
- *
- */
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 149, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(1, 149, __pyx_L1_error)
-
- /* "View.MemoryView":148
- * self._strides = self._shape + self.ndim
- *
- * if not self._shape: # <<<<<<<<<<<<<<
- * raise MemoryError("unable to allocate shape and strides.")
- *
- */
- }
-
- /* "View.MemoryView":152
- *
- *
- * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<<
- * if dim <= 0:
- * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
- */
- __pyx_t_8 = 0;
- __pyx_t_3 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
- for (;;) {
- if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(1, 152, __pyx_L1_error)
- #else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 152, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- #endif
- __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 152, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_v_dim = __pyx_t_9;
- __pyx_v_idx = __pyx_t_8;
- __pyx_t_8 = (__pyx_t_8 + 1);
-
- /* "View.MemoryView":153
- *
- * for idx, dim in enumerate(shape):
- * if dim <= 0: # <<<<<<<<<<<<<<
- * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
- * self._shape[idx] = dim
- */
- __pyx_t_4 = ((__pyx_v_dim <= 0) != 0);
- if (unlikely(__pyx_t_4)) {
-
- /* "View.MemoryView":154
- * for idx, dim in enumerate(shape):
- * if dim <= 0:
- * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) # <<<<<<<<<<<<<<
- * self._shape[idx] = dim
- *
- */
- __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 154, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 154, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 154, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_6);
- PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_6);
- __pyx_t_5 = 0;
- __pyx_t_6 = 0;
- __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 154, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 154, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_Raise(__pyx_t_10, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __PYX_ERR(1, 154, __pyx_L1_error)
-
- /* "View.MemoryView":153
- *
- * for idx, dim in enumerate(shape):
- * if dim <= 0: # <<<<<<<<<<<<<<
- * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
- * self._shape[idx] = dim
- */
- }
-
- /* "View.MemoryView":155
- * if dim <= 0:
- * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
- * self._shape[idx] = dim # <<<<<<<<<<<<<<
- *
- * cdef char order
- */
- (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim;
-
- /* "View.MemoryView":152
- *
- *
- * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<<
- * if dim <= 0:
- * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
- */
- }
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-
- /* "View.MemoryView":158
- *
- * cdef char order
- * if mode == 'fortran': # <<<<<<<<<<<<<<
- * order = b'F'
- * self.mode = u'fortran'
- */
- __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_fortran, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 158, __pyx_L1_error)
- if (__pyx_t_4) {
-
- /* "View.MemoryView":159
- * cdef char order
- * if mode == 'fortran':
- * order = b'F' # <<<<<<<<<<<<<<
- * self.mode = u'fortran'
- * elif mode == 'c':
- */
- __pyx_v_order = 'F';
-
- /* "View.MemoryView":160
- * if mode == 'fortran':
- * order = b'F'
- * self.mode = u'fortran' # <<<<<<<<<<<<<<
- * elif mode == 'c':
- * order = b'C'
- */
- __Pyx_INCREF(__pyx_n_u_fortran);
- __Pyx_GIVEREF(__pyx_n_u_fortran);
- __Pyx_GOTREF(__pyx_v_self->mode);
- __Pyx_DECREF(__pyx_v_self->mode);
- __pyx_v_self->mode = __pyx_n_u_fortran;
-
- /* "View.MemoryView":158
- *
- * cdef char order
- * if mode == 'fortran': # <<<<<<<<<<<<<<
- * order = b'F'
- * self.mode = u'fortran'
- */
- goto __pyx_L10;
- }
-
- /* "View.MemoryView":161
- * order = b'F'
- * self.mode = u'fortran'
- * elif mode == 'c': # <<<<<<<<<<<<<<
- * order = b'C'
- * self.mode = u'c'
- */
- __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_c, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 161, __pyx_L1_error)
- if (likely(__pyx_t_4)) {
-
- /* "View.MemoryView":162
- * self.mode = u'fortran'
- * elif mode == 'c':
- * order = b'C' # <<<<<<<<<<<<<<
- * self.mode = u'c'
- * else:
- */
- __pyx_v_order = 'C';
-
- /* "View.MemoryView":163
- * elif mode == 'c':
- * order = b'C'
- * self.mode = u'c' # <<<<<<<<<<<<<<
- * else:
- * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
- */
- __Pyx_INCREF(__pyx_n_u_c);
- __Pyx_GIVEREF(__pyx_n_u_c);
- __Pyx_GOTREF(__pyx_v_self->mode);
- __Pyx_DECREF(__pyx_v_self->mode);
- __pyx_v_self->mode = __pyx_n_u_c;
-
- /* "View.MemoryView":161
- * order = b'F'
- * self.mode = u'fortran'
- * elif mode == 'c': # <<<<<<<<<<<<<<
- * order = b'C'
- * self.mode = u'c'
- */
- goto __pyx_L10;
- }
-
- /* "View.MemoryView":165
- * self.mode = u'c'
- * else:
- * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode) # <<<<<<<<<<<<<<
- *
- * self.len = fill_contig_strides_array(self._shape, self._strides,
- */
- /*else*/ {
- __pyx_t_3 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_v_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 165, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 165, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_Raise(__pyx_t_10, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __PYX_ERR(1, 165, __pyx_L1_error)
- }
- __pyx_L10:;
-
- /* "View.MemoryView":167
- * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
- *
- * self.len = fill_contig_strides_array(self._shape, self._strides, # <<<<<<<<<<<<<<
- * itemsize, self.ndim, order)
- *
- */
- __pyx_v_self->len = __pyx_fill_contig_strides_array(__pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_itemsize, __pyx_v_self->ndim, __pyx_v_order);
-
- /* "View.MemoryView":170
- * itemsize, self.ndim, order)
- *
- * self.free_data = allocate_buffer # <<<<<<<<<<<<<<
- * self.dtype_is_object = format == b'O'
- * if allocate_buffer:
- */
- __pyx_v_self->free_data = __pyx_v_allocate_buffer;
-
- /* "View.MemoryView":171
- *
- * self.free_data = allocate_buffer
- * self.dtype_is_object = format == b'O' # <<<<<<<<<<<<<<
- * if allocate_buffer:
- *
- */
- __pyx_t_10 = PyObject_RichCompare(__pyx_v_format, __pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 171, __pyx_L1_error)
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 171, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_v_self->dtype_is_object = __pyx_t_4;
-
- /* "View.MemoryView":172
- * self.free_data = allocate_buffer
- * self.dtype_is_object = format == b'O'
- * if allocate_buffer: # <<<<<<<<<<<<<<
- *
- *
- */
- __pyx_t_4 = (__pyx_v_allocate_buffer != 0);
- if (__pyx_t_4) {
-
- /* "View.MemoryView":175
- *
- *
- * self.data = malloc(self.len) # <<<<<<<<<<<<<<
- * if not self.data:
- * raise MemoryError("unable to allocate array data.")
- */
- __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len));
-
- /* "View.MemoryView":176
- *
- * self.data = malloc(self.len)
- * if not self.data: # <<<<<<<<<<<<<<
- * raise MemoryError("unable to allocate array data.")
- *
- */
- __pyx_t_4 = ((!(__pyx_v_self->data != 0)) != 0);
- if (unlikely(__pyx_t_4)) {
-
- /* "View.MemoryView":177
- * self.data = malloc(self.len)
- * if not self.data:
- * raise MemoryError("unable to allocate array data.") # <<<<<<<<<<<<<<
- *
- * if self.dtype_is_object:
- */
- __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 177, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_Raise(__pyx_t_10, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __PYX_ERR(1, 177, __pyx_L1_error)
-
- /* "View.MemoryView":176
- *
- * self.data = malloc(self.len)
- * if not self.data: # <<<<<<<<<<<<<<
- * raise MemoryError("unable to allocate array data.")
- *
- */
- }
-
- /* "View.MemoryView":179
- * raise MemoryError("unable to allocate array data.")
- *
- * if self.dtype_is_object: # <<<<<<<<<<<<<<
- * p = self.data
- * for i in range(self.len / itemsize):
- */
- __pyx_t_4 = (__pyx_v_self->dtype_is_object != 0);
- if (__pyx_t_4) {
-
- /* "View.MemoryView":180
- *
- * if self.dtype_is_object:
- * p = self.data # <<<<<<<<<<<<<<
- * for i in range(self.len / itemsize):
- * p[i] = Py_None
- */
- __pyx_v_p = ((PyObject **)__pyx_v_self->data);
-
- /* "View.MemoryView":181
- * if self.dtype_is_object:
- * p = self.data
- * for i in range(self.len / itemsize): # <<<<<<<<<<<<<<
- * p[i] = Py_None
- * Py_INCREF(Py_None)
- */
- if (unlikely(__pyx_v_itemsize == 0)) {
- PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
- __PYX_ERR(1, 181, __pyx_L1_error)
- }
- else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->len))) {
- PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
- __PYX_ERR(1, 181, __pyx_L1_error)
- }
- __pyx_t_1 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_itemsize);
- __pyx_t_9 = __pyx_t_1;
- for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) {
- __pyx_v_i = __pyx_t_11;
-
- /* "View.MemoryView":182
- * p = self.data
- * for i in range(self.len / itemsize):
- * p[i] = Py_None # <<<<<<<<<<<<<<
- * Py_INCREF(Py_None)
- *
- */
- (__pyx_v_p[__pyx_v_i]) = Py_None;
-
- /* "View.MemoryView":183
- * for i in range(self.len / itemsize):
- * p[i] = Py_None
- * Py_INCREF(Py_None) # <<<<<<<<<<<<<<
- *
- * @cname('getbuffer')
- */
- Py_INCREF(Py_None);
- }
-
- /* "View.MemoryView":179
- * raise MemoryError("unable to allocate array data.")
- *
- * if self.dtype_is_object: # <<<<<<<<<<<<<<
- * p = self.data
- * for i in range(self.len / itemsize):
- */
- }
-
- /* "View.MemoryView":172
- * self.free_data = allocate_buffer
- * self.dtype_is_object = format == b'O'
- * if allocate_buffer: # <<<<<<<<<<<<<<
- *
- *
- */
- }
-
- /* "View.MemoryView":123
- * cdef bint dtype_is_object
- *
- * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
- * mode="c", bint allocate_buffer=True):
- *
- */
-
- /* function exit code */
- __pyx_r = 0;
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_5);
- __Pyx_XDECREF(__pyx_t_6);
- __Pyx_XDECREF(__pyx_t_10);
- __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = -1;
- __pyx_L0:;
- __Pyx_XDECREF(__pyx_v_format);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":186
- *
- * @cname('getbuffer')
- * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
- * cdef int bufmode = -1
- * if self.mode == u"c":
- */
-
-/* Python wrapper */
-static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
-static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
- int __pyx_r;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
- __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(((struct __pyx_array_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
- int __pyx_v_bufmode;
- int __pyx_r;
- __Pyx_RefNannyDeclarations
- int __pyx_t_1;
- int __pyx_t_2;
- PyObject *__pyx_t_3 = NULL;
- char *__pyx_t_4;
- Py_ssize_t __pyx_t_5;
- int __pyx_t_6;
- Py_ssize_t *__pyx_t_7;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- if (__pyx_v_info == NULL) {
- PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
- return -1;
- }
- __Pyx_RefNannySetupContext("__getbuffer__", 0);
- __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
- __Pyx_GIVEREF(__pyx_v_info->obj);
-
- /* "View.MemoryView":187
- * @cname('getbuffer')
- * def __getbuffer__(self, Py_buffer *info, int flags):
- * cdef int bufmode = -1 # <<<<<<<<<<<<<<
- * if self.mode == u"c":
- * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
- */
- __pyx_v_bufmode = -1;
-
- /* "View.MemoryView":188
- * def __getbuffer__(self, Py_buffer *info, int flags):
- * cdef int bufmode = -1
- * if self.mode == u"c": # <<<<<<<<<<<<<<
- * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
- * elif self.mode == u"fortran":
- */
- __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_c, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 188, __pyx_L1_error)
- __pyx_t_2 = (__pyx_t_1 != 0);
- if (__pyx_t_2) {
-
- /* "View.MemoryView":189
- * cdef int bufmode = -1
- * if self.mode == u"c":
- * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<<
- * elif self.mode == u"fortran":
- * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
- */
- __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
-
- /* "View.MemoryView":188
- * def __getbuffer__(self, Py_buffer *info, int flags):
- * cdef int bufmode = -1
- * if self.mode == u"c": # <<<<<<<<<<<<<<
- * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
- * elif self.mode == u"fortran":
- */
- goto __pyx_L3;
- }
-
- /* "View.MemoryView":190
- * if self.mode == u"c":
- * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
- * elif self.mode == u"fortran": # <<<<<<<<<<<<<<
- * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
- * if not (flags & bufmode):
- */
- __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_fortran, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 190, __pyx_L1_error)
- __pyx_t_1 = (__pyx_t_2 != 0);
- if (__pyx_t_1) {
-
- /* "View.MemoryView":191
- * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
- * elif self.mode == u"fortran":
- * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<<
- * if not (flags & bufmode):
- * raise ValueError("Can only create a buffer that is contiguous in memory.")
- */
- __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
-
- /* "View.MemoryView":190
- * if self.mode == u"c":
- * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
- * elif self.mode == u"fortran": # <<<<<<<<<<<<<<
- * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
- * if not (flags & bufmode):
- */
- }
- __pyx_L3:;
-
- /* "View.MemoryView":192
- * elif self.mode == u"fortran":
- * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
- * if not (flags & bufmode): # <<<<<<<<<<<<<<
- * raise ValueError("Can only create a buffer that is contiguous in memory.")
- * info.buf = self.data
- */
- __pyx_t_1 = ((!((__pyx_v_flags & __pyx_v_bufmode) != 0)) != 0);
- if (unlikely(__pyx_t_1)) {
-
- /* "View.MemoryView":193
- * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
- * if not (flags & bufmode):
- * raise ValueError("Can only create a buffer that is contiguous in memory.") # <<<<<<<<<<<<<<
- * info.buf = self.data
- * info.len = self.len
- */
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 193, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(1, 193, __pyx_L1_error)
-
- /* "View.MemoryView":192
- * elif self.mode == u"fortran":
- * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
- * if not (flags & bufmode): # <<<<<<<<<<<<<<
- * raise ValueError("Can only create a buffer that is contiguous in memory.")
- * info.buf = self.data
- */
- }
-
- /* "View.MemoryView":194
- * if not (flags & bufmode):
- * raise ValueError("Can only create a buffer that is contiguous in memory.")
- * info.buf = self.data # <<<<<<<<<<<<<<
- * info.len = self.len
- * info.ndim = self.ndim
- */
- __pyx_t_4 = __pyx_v_self->data;
- __pyx_v_info->buf = __pyx_t_4;
-
- /* "View.MemoryView":195
- * raise ValueError("Can only create a buffer that is contiguous in memory.")
- * info.buf = self.data
- * info.len = self.len # <<<<<<<<<<<<<<
- * info.ndim = self.ndim
- * info.shape = self._shape
- */
- __pyx_t_5 = __pyx_v_self->len;
- __pyx_v_info->len = __pyx_t_5;
-
- /* "View.MemoryView":196
- * info.buf = self.data
- * info.len = self.len
- * info.ndim = self.ndim # <<<<<<<<<<<<<<
- * info.shape = self._shape
- * info.strides = self._strides
- */
- __pyx_t_6 = __pyx_v_self->ndim;
- __pyx_v_info->ndim = __pyx_t_6;
-
- /* "View.MemoryView":197
- * info.len = self.len
- * info.ndim = self.ndim
- * info.shape = self._shape # <<<<<<<<<<<<<<
- * info.strides = self._strides
- * info.suboffsets = NULL
- */
- __pyx_t_7 = __pyx_v_self->_shape;
- __pyx_v_info->shape = __pyx_t_7;
-
- /* "View.MemoryView":198
- * info.ndim = self.ndim
- * info.shape = self._shape
- * info.strides = self._strides # <<<<<<<<<<<<<<
- * info.suboffsets = NULL
- * info.itemsize = self.itemsize
- */
- __pyx_t_7 = __pyx_v_self->_strides;
- __pyx_v_info->strides = __pyx_t_7;
-
- /* "View.MemoryView":199
- * info.shape = self._shape
- * info.strides = self._strides
- * info.suboffsets = NULL # <<<<<<<<<<<<<<
- * info.itemsize = self.itemsize
- * info.readonly = 0
- */
- __pyx_v_info->suboffsets = NULL;
-
- /* "View.MemoryView":200
- * info.strides = self._strides
- * info.suboffsets = NULL
- * info.itemsize = self.itemsize # <<<<<<<<<<<<<<
- * info.readonly = 0
- *
- */
- __pyx_t_5 = __pyx_v_self->itemsize;
- __pyx_v_info->itemsize = __pyx_t_5;
-
- /* "View.MemoryView":201
- * info.suboffsets = NULL
- * info.itemsize = self.itemsize
- * info.readonly = 0 # <<<<<<<<<<<<<<
- *
- * if flags & PyBUF_FORMAT:
- */
- __pyx_v_info->readonly = 0;
-
- /* "View.MemoryView":203
- * info.readonly = 0
- *
- * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
- * info.format = self.format
- * else:
- */
- __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
- if (__pyx_t_1) {
-
- /* "View.MemoryView":204
- *
- * if flags & PyBUF_FORMAT:
- * info.format = self.format # <<<<<<<<<<<<<<
- * else:
- * info.format = NULL
- */
- __pyx_t_4 = __pyx_v_self->format;
- __pyx_v_info->format = __pyx_t_4;
-
- /* "View.MemoryView":203
- * info.readonly = 0
- *
- * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
- * info.format = self.format
- * else:
- */
- goto __pyx_L5;
- }
-
- /* "View.MemoryView":206
- * info.format = self.format
- * else:
- * info.format = NULL # <<<<<<<<<<<<<<
- *
- * info.obj = self
- */
- /*else*/ {
- __pyx_v_info->format = NULL;
- }
- __pyx_L5:;
-
- /* "View.MemoryView":208
- * info.format = NULL
- *
- * info.obj = self # <<<<<<<<<<<<<<
- *
- * __pyx_getbuffer = capsule( &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
- */
- __Pyx_INCREF(((PyObject *)__pyx_v_self));
- __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
- __Pyx_GOTREF(__pyx_v_info->obj);
- __Pyx_DECREF(__pyx_v_info->obj);
- __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
-
- /* "View.MemoryView":186
- *
- * @cname('getbuffer')
- * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
- * cdef int bufmode = -1
- * if self.mode == u"c":
- */
-
- /* function exit code */
- __pyx_r = 0;
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = -1;
- if (__pyx_v_info->obj != NULL) {
- __Pyx_GOTREF(__pyx_v_info->obj);
- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
- }
- goto __pyx_L2;
- __pyx_L0:;
- if (__pyx_v_info->obj == Py_None) {
- __Pyx_GOTREF(__pyx_v_info->obj);
- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
- }
- __pyx_L2:;
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":212
- * __pyx_getbuffer = capsule( &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
- *
- * def __dealloc__(array self): # <<<<<<<<<<<<<<
- * if self.callback_free_data != NULL:
- * self.callback_free_data(self.data)
- */
-
-/* Python wrapper */
-static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/
-static void __pyx_array___dealloc__(PyObject *__pyx_v_self) {
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
- __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
-}
-
-static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) {
- __Pyx_RefNannyDeclarations
- int __pyx_t_1;
- __Pyx_RefNannySetupContext("__dealloc__", 0);
-
- /* "View.MemoryView":213
- *
- * def __dealloc__(array self):
- * if self.callback_free_data != NULL: # <<<<<<<<<<<<<<
- * self.callback_free_data(self.data)
- * elif self.free_data:
- */
- __pyx_t_1 = ((__pyx_v_self->callback_free_data != NULL) != 0);
- if (__pyx_t_1) {
-
- /* "View.MemoryView":214
- * def __dealloc__(array self):
- * if self.callback_free_data != NULL:
- * self.callback_free_data(self.data) # <<<<<<<<<<<<<<
- * elif self.free_data:
- * if self.dtype_is_object:
- */
- __pyx_v_self->callback_free_data(__pyx_v_self->data);
-
- /* "View.MemoryView":213
- *
- * def __dealloc__(array self):
- * if self.callback_free_data != NULL: # <<<<<<<<<<<<<<
- * self.callback_free_data(self.data)
- * elif self.free_data:
- */
- goto __pyx_L3;
- }
-
- /* "View.MemoryView":215
- * if self.callback_free_data != NULL:
- * self.callback_free_data(self.data)
- * elif self.free_data: # <<<<<<<<<<<<<<
- * if self.dtype_is_object:
- * refcount_objects_in_slice(self.data, self._shape,
- */
- __pyx_t_1 = (__pyx_v_self->free_data != 0);
- if (__pyx_t_1) {
-
- /* "View.MemoryView":216
- * self.callback_free_data(self.data)
- * elif self.free_data:
- * if self.dtype_is_object: # <<<<<<<<<<<<<<
- * refcount_objects_in_slice(self.data, self._shape,
- * self._strides, self.ndim, False)
- */
- __pyx_t_1 = (__pyx_v_self->dtype_is_object != 0);
- if (__pyx_t_1) {
-
- /* "View.MemoryView":217
- * elif self.free_data:
- * if self.dtype_is_object:
- * refcount_objects_in_slice(self.data, self._shape, # <<<<<<<<<<<<<<
- * self._strides, self.ndim, False)
- * free(self.data)
- */
- __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0);
-
- /* "View.MemoryView":216
- * self.callback_free_data(self.data)
- * elif self.free_data:
- * if self.dtype_is_object: # <<<<<<<<<<<<<<
- * refcount_objects_in_slice(self.data, self._shape,
- * self._strides, self.ndim, False)
- */
- }
-
- /* "View.MemoryView":219
- * refcount_objects_in_slice(self.data, self._shape,
- * self._strides, self.ndim, False)
- * free(self.data) # <<<<<<<<<<<<<<
- * PyObject_Free(self._shape)
- *
- */
- free(__pyx_v_self->data);
-
- /* "View.MemoryView":215
- * if self.callback_free_data != NULL:
- * self.callback_free_data(self.data)
- * elif self.free_data: # <<<<<<<<<<<<<<
- * if self.dtype_is_object:
- * refcount_objects_in_slice(self.data, self._shape,
- */
- }
- __pyx_L3:;
-
- /* "View.MemoryView":220
- * self._strides, self.ndim, False)
- * free(self.data)
- * PyObject_Free(self._shape) # <<<<<<<<<<<<<<
- *
- * @property
- */
- PyObject_Free(__pyx_v_self->_shape);
-
- /* "View.MemoryView":212
- * __pyx_getbuffer = capsule( &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
- *
- * def __dealloc__(array self): # <<<<<<<<<<<<<<
- * if self.callback_free_data != NULL:
- * self.callback_free_data(self.data)
- */
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
-}
-
-/* "View.MemoryView":223
- *
- * @property
- * def memview(self): # <<<<<<<<<<<<<<
- * return self.get_memview()
- *
- */
-
-/* Python wrapper */
-static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__get__", 0);
-
- /* "View.MemoryView":224
- * @property
- * def memview(self):
- * return self.get_memview() # <<<<<<<<<<<<<<
- *
- * @cname('get_memview')
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 224, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
- /* "View.MemoryView":223
- *
- * @property
- * def memview(self): # <<<<<<<<<<<<<<
- * return self.get_memview()
- *
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":227
- *
- * @cname('get_memview')
- * cdef get_memview(self): # <<<<<<<<<<<<<<
- * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
- * return memoryview(self, flags, self.dtype_is_object)
- */
-
-static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) {
- int __pyx_v_flags;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("get_memview", 0);
-
- /* "View.MemoryView":228
- * @cname('get_memview')
- * cdef get_memview(self):
- * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE # <<<<<<<<<<<<<<
- * return memoryview(self, flags, self.dtype_is_object)
- *
- */
- __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE);
-
- /* "View.MemoryView":229
- * cdef get_memview(self):
- * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
- * return memoryview(self, flags, self.dtype_is_object) # <<<<<<<<<<<<<<
- *
- * def __len__(self):
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 229, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 229, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 229, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_INCREF(((PyObject *)__pyx_v_self));
- __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
- PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
- __pyx_t_1 = 0;
- __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 229, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_r = __pyx_t_2;
- __pyx_t_2 = 0;
- goto __pyx_L0;
-
- /* "View.MemoryView":227
- *
- * @cname('get_memview')
- * cdef get_memview(self): # <<<<<<<<<<<<<<
- * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
- * return memoryview(self, flags, self.dtype_is_object)
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("View.MemoryView.array.get_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = 0;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":231
- * return memoryview(self, flags, self.dtype_is_object)
- *
- * def __len__(self): # <<<<<<<<<<<<<<
- * return self._shape[0]
- *
- */
-
-/* Python wrapper */
-static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/
-static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) {
- Py_ssize_t __pyx_r;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
- __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) {
- Py_ssize_t __pyx_r;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__len__", 0);
-
- /* "View.MemoryView":232
- *
- * def __len__(self):
- * return self._shape[0] # <<<<<<<<<<<<<<
- *
- * def __getattr__(self, attr):
- */
- __pyx_r = (__pyx_v_self->_shape[0]);
- goto __pyx_L0;
-
- /* "View.MemoryView":231
- * return memoryview(self, flags, self.dtype_is_object)
- *
- * def __len__(self): # <<<<<<<<<<<<<<
- * return self._shape[0]
- *
- */
-
- /* function exit code */
- __pyx_L0:;
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":234
- * return self._shape[0]
- *
- * def __getattr__(self, attr): # <<<<<<<<<<<<<<
- * return getattr(self.memview, attr)
- *
- */
-
-/* Python wrapper */
-static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/
-static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
- __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__getattr__", 0);
-
- /* "View.MemoryView":235
- *
- * def __getattr__(self, attr):
- * return getattr(self.memview, attr) # <<<<<<<<<<<<<<
- *
- * def __getitem__(self, item):
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 235, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 235, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_r = __pyx_t_2;
- __pyx_t_2 = 0;
- goto __pyx_L0;
-
- /* "View.MemoryView":234
- * return self._shape[0]
- *
- * def __getattr__(self, attr): # <<<<<<<<<<<<<<
- * return getattr(self.memview, attr)
- *
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":237
- * return getattr(self.memview, attr)
- *
- * def __getitem__(self, item): # <<<<<<<<<<<<<<
- * return self.memview[item]
- *
- */
-
-/* Python wrapper */
-static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
-static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
- __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__getitem__", 0);
-
- /* "View.MemoryView":238
- *
- * def __getitem__(self, item):
- * return self.memview[item] # <<<<<<<<<<<<<<
- *
- * def __setitem__(self, item, value):
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 238, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 238, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_r = __pyx_t_2;
- __pyx_t_2 = 0;
- goto __pyx_L0;
-
- /* "View.MemoryView":237
- * return getattr(self.memview, attr)
- *
- * def __getitem__(self, item): # <<<<<<<<<<<<<<
- * return self.memview[item]
- *
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":240
- * return self.memview[item]
- *
- * def __setitem__(self, item, value): # <<<<<<<<<<<<<<
- * self.memview[item] = value
- *
- */
-
-/* Python wrapper */
-static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/
-static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
- int __pyx_r;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
- __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item), ((PyObject *)__pyx_v_value));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
- int __pyx_r;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__setitem__", 0);
-
- /* "View.MemoryView":241
- *
- * def __setitem__(self, item, value):
- * self.memview[item] = value # <<<<<<<<<<<<<<
- *
- *
- */
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 241, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0)) __PYX_ERR(1, 241, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
- /* "View.MemoryView":240
- * return self.memview[item]
- *
- * def __setitem__(self, item, value): # <<<<<<<<<<<<<<
- * self.memview[item] = value
- *
- */
-
- /* function exit code */
- __pyx_r = 0;
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = -1;
- __pyx_L0:;
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "(tree fragment)":1
- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
- * def __setstate_cython__(self, __pyx_state):
- */
-
-/* Python wrapper */
-static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
- __pyx_r = __pyx_pf___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__reduce_cython__", 0);
-
- /* "(tree fragment)":2
- * def __reduce_cython__(self):
- * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
- * def __setstate_cython__(self, __pyx_state):
- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
- */
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(1, 2, __pyx_L1_error)
-
- /* "(tree fragment)":1
- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
- * def __setstate_cython__(self, __pyx_state):
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "(tree fragment)":3
- * def __reduce_cython__(self):
- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
- */
-
-/* Python wrapper */
-static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
-static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
- __pyx_r = __pyx_pf___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__setstate_cython__", 0);
-
- /* "(tree fragment)":4
- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
- * def __setstate_cython__(self, __pyx_state):
- * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
- */
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(1, 4, __pyx_L1_error)
-
- /* "(tree fragment)":3
- * def __reduce_cython__(self):
- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":245
- *
- * @cname("__pyx_array_new")
- * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, # <<<<<<<<<<<<<<
- * char *mode, char *buf):
- * cdef array result
- */
-
-static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, char *__pyx_v_format, char *__pyx_v_mode, char *__pyx_v_buf) {
- struct __pyx_array_obj *__pyx_v_result = 0;
- struct __pyx_array_obj *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- int __pyx_t_1;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
- PyObject *__pyx_t_4 = NULL;
- PyObject *__pyx_t_5 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("array_cwrapper", 0);
-
- /* "View.MemoryView":249
- * cdef array result
- *
- * if buf == NULL: # <<<<<<<<<<<<<<
- * result = array(shape, itemsize, format, mode.decode('ASCII'))
- * else:
- */
- __pyx_t_1 = ((__pyx_v_buf == NULL) != 0);
- if (__pyx_t_1) {
-
- /* "View.MemoryView":250
- *
- * if buf == NULL:
- * result = array(shape, itemsize, format, mode.decode('ASCII')) # <<<<<<<<<<<<<<
- * else:
- * result = array(shape, itemsize, format, mode.decode('ASCII'),
- */
- __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 250, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 250, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 250, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 250, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_INCREF(__pyx_v_shape);
- __Pyx_GIVEREF(__pyx_v_shape);
- PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_shape);
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
- __pyx_t_2 = 0;
- __pyx_t_3 = 0;
- __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 250, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_4);
- __pyx_t_4 = 0;
-
- /* "View.MemoryView":249
- * cdef array result
- *
- * if buf == NULL: # <<<<<<<<<<<<<<
- * result = array(shape, itemsize, format, mode.decode('ASCII'))
- * else:
- */
- goto __pyx_L3;
- }
-
- /* "View.MemoryView":252
- * result = array(shape, itemsize, format, mode.decode('ASCII'))
- * else:
- * result = array(shape, itemsize, format, mode.decode('ASCII'), # <<<<<<<<<<<<<<
- * allocate_buffer=False)
- * result.data = buf
- */
- /*else*/ {
- __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 252, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 252, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 252, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 252, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_INCREF(__pyx_v_shape);
- __Pyx_GIVEREF(__pyx_v_shape);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_shape);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_3);
- __pyx_t_4 = 0;
- __pyx_t_5 = 0;
- __pyx_t_3 = 0;
-
- /* "View.MemoryView":253
- * else:
- * result = array(shape, itemsize, format, mode.decode('ASCII'),
- * allocate_buffer=False) # <<<<<<<<<<<<<<
- * result.data = buf
- *
- */
- __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 253, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(1, 253, __pyx_L1_error)
-
- /* "View.MemoryView":252
- * result = array(shape, itemsize, format, mode.decode('ASCII'))
- * else:
- * result = array(shape, itemsize, format, mode.decode('ASCII'), # <<<<<<<<<<<<<<
- * allocate_buffer=False)
- * result.data = buf
- */
- __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 252, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_5);
- __pyx_t_5 = 0;
-
- /* "View.MemoryView":254
- * result = array(shape, itemsize, format, mode.decode('ASCII'),
- * allocate_buffer=False)
- * result.data = buf # <<<<<<<<<<<<<<
- *
- * return result
- */
- __pyx_v_result->data = __pyx_v_buf;
- }
- __pyx_L3:;
-
- /* "View.MemoryView":256
- * result.data = buf
- *
- * return result # <<<<<<<<<<<<<<
- *
- *
- */
- __Pyx_XDECREF(((PyObject *)__pyx_r));
- __Pyx_INCREF(((PyObject *)__pyx_v_result));
- __pyx_r = __pyx_v_result;
- goto __pyx_L0;
-
- /* "View.MemoryView":245
- *
- * @cname("__pyx_array_new")
- * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, # <<<<<<<<<<<<<<
- * char *mode, char *buf):
- * cdef array result
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5);
- __Pyx_AddTraceback("View.MemoryView.array_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = 0;
- __pyx_L0:;
- __Pyx_XDECREF((PyObject *)__pyx_v_result);
- __Pyx_XGIVEREF((PyObject *)__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":282
- * cdef class Enum(object):
- * cdef object name
- * def __init__(self, name): # <<<<<<<<<<<<<<
- * self.name = name
- * def __repr__(self):
- */
-
-/* Python wrapper */
-static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
- PyObject *__pyx_v_name = 0;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- int __pyx_r;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
- {
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
- PyObject* values[1] = {0};
- if (unlikely(__pyx_kwds)) {
- Py_ssize_t kw_args;
- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
- switch (pos_args) {
- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
- CYTHON_FALLTHROUGH;
- case 0: break;
- default: goto __pyx_L5_argtuple_error;
- }
- kw_args = PyDict_Size(__pyx_kwds);
- switch (pos_args) {
- case 0:
- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
- else goto __pyx_L5_argtuple_error;
- }
- if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 282, __pyx_L3_error)
- }
- } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
- goto __pyx_L5_argtuple_error;
- } else {
- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
- }
- __pyx_v_name = values[0];
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 282, __pyx_L3_error)
- __pyx_L3_error:;
- __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return -1;
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name);
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) {
- int __pyx_r;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__init__", 0);
-
- /* "View.MemoryView":283
- * cdef object name
- * def __init__(self, name):
- * self.name = name # <<<<<<<<<<<<<<
- * def __repr__(self):
- * return self.name
- */
- __Pyx_INCREF(__pyx_v_name);
- __Pyx_GIVEREF(__pyx_v_name);
- __Pyx_GOTREF(__pyx_v_self->name);
- __Pyx_DECREF(__pyx_v_self->name);
- __pyx_v_self->name = __pyx_v_name;
-
- /* "View.MemoryView":282
- * cdef class Enum(object):
- * cdef object name
- * def __init__(self, name): # <<<<<<<<<<<<<<
- * self.name = name
- * def __repr__(self):
- */
-
- /* function exit code */
- __pyx_r = 0;
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":284
- * def __init__(self, name):
- * self.name = name
- * def __repr__(self): # <<<<<<<<<<<<<<
- * return self.name
- *
- */
-
-/* Python wrapper */
-static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
- __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__repr__", 0);
-
- /* "View.MemoryView":285
- * self.name = name
- * def __repr__(self):
- * return self.name # <<<<<<<<<<<<<<
- *
- * cdef generic = Enum("")
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(__pyx_v_self->name);
- __pyx_r = __pyx_v_self->name;
- goto __pyx_L0;
-
- /* "View.MemoryView":284
- * def __init__(self, name):
- * self.name = name
- * def __repr__(self): # <<<<<<<<<<<<<<
- * return self.name
- *
- */
-
- /* function exit code */
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "(tree fragment)":1
- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
- * cdef tuple state
- * cdef object _dict
- */
-
-/* Python wrapper */
-static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
- __pyx_r = __pyx_pf___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
- PyObject *__pyx_v_state = 0;
- PyObject *__pyx_v__dict = 0;
- int __pyx_v_use_setstate;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_t_2;
- int __pyx_t_3;
- PyObject *__pyx_t_4 = NULL;
- PyObject *__pyx_t_5 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__reduce_cython__", 0);
-
- /* "(tree fragment)":5
- * cdef object _dict
- * cdef bint use_setstate
- * state = (self.name,) # <<<<<<<<<<<<<<
- * _dict = getattr(self, '__dict__', None)
- * if _dict is not None:
- */
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_INCREF(__pyx_v_self->name);
- __Pyx_GIVEREF(__pyx_v_self->name);
- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name);
- __pyx_v_state = ((PyObject*)__pyx_t_1);
- __pyx_t_1 = 0;
-
- /* "(tree fragment)":6
- * cdef bint use_setstate
- * state = (self.name,)
- * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
- * if _dict is not None:
- * state += (_dict,)
- */
- __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_v__dict = __pyx_t_1;
- __pyx_t_1 = 0;
-
- /* "(tree fragment)":7
- * state = (self.name,)
- * _dict = getattr(self, '__dict__', None)
- * if _dict is not None: # <<<<<<<<<<<<<<
- * state += (_dict,)
- * use_setstate = True
- */
- __pyx_t_2 = (__pyx_v__dict != Py_None);
- __pyx_t_3 = (__pyx_t_2 != 0);
- if (__pyx_t_3) {
-
- /* "(tree fragment)":8
- * _dict = getattr(self, '__dict__', None)
- * if _dict is not None:
- * state += (_dict,) # <<<<<<<<<<<<<<
- * use_setstate = True
- * else:
- */
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_INCREF(__pyx_v__dict);
- __Pyx_GIVEREF(__pyx_v__dict);
- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
- __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
- __pyx_t_4 = 0;
-
- /* "(tree fragment)":9
- * if _dict is not None:
- * state += (_dict,)
- * use_setstate = True # <<<<<<<<<<<<<<
- * else:
- * use_setstate = self.name is not None
- */
- __pyx_v_use_setstate = 1;
-
- /* "(tree fragment)":7
- * state = (self.name,)
- * _dict = getattr(self, '__dict__', None)
- * if _dict is not None: # <<<<<<<<<<<<<<
- * state += (_dict,)
- * use_setstate = True
- */
- goto __pyx_L3;
- }
-
- /* "(tree fragment)":11
- * use_setstate = True
- * else:
- * use_setstate = self.name is not None # <<<<<<<<<<<<<<
- * if use_setstate:
- * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
- */
- /*else*/ {
- __pyx_t_3 = (__pyx_v_self->name != Py_None);
- __pyx_v_use_setstate = __pyx_t_3;
- }
- __pyx_L3:;
-
- /* "(tree fragment)":12
- * else:
- * use_setstate = self.name is not None
- * if use_setstate: # <<<<<<<<<<<<<<
- * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
- * else:
- */
- __pyx_t_3 = (__pyx_v_use_setstate != 0);
- if (__pyx_t_3) {
-
- /* "(tree fragment)":13
- * use_setstate = self.name is not None
- * if use_setstate:
- * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state # <<<<<<<<<<<<<<
- * else:
- * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
- __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
- PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
- __Pyx_INCREF(__pyx_int_184977713);
- __Pyx_GIVEREF(__pyx_int_184977713);
- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);
- __Pyx_INCREF(Py_None);
- __Pyx_GIVEREF(Py_None);
- PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
- __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
- __Pyx_INCREF(__pyx_v_state);
- __Pyx_GIVEREF(__pyx_v_state);
- PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
- __pyx_t_4 = 0;
- __pyx_t_1 = 0;
- __pyx_r = __pyx_t_5;
- __pyx_t_5 = 0;
- goto __pyx_L0;
-
- /* "(tree fragment)":12
- * else:
- * use_setstate = self.name is not None
- * if use_setstate: # <<<<<<<<<<<<<<
- * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
- * else:
- */
- }
-
- /* "(tree fragment)":15
- * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
- * else:
- * return __pyx_unpickle_Enum, (type(self), 0xb068931, state) # <<<<<<<<<<<<<<
- * def __setstate_cython__(self, __pyx_state):
- * __pyx_unpickle_Enum__set_state(self, __pyx_state)
- */
- /*else*/ {
- __Pyx_XDECREF(__pyx_r);
- __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
- __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
- PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
- __Pyx_INCREF(__pyx_int_184977713);
- __Pyx_GIVEREF(__pyx_int_184977713);
- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);
- __Pyx_INCREF(__pyx_v_state);
- __Pyx_GIVEREF(__pyx_v_state);
- PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
- __pyx_t_5 = 0;
- __pyx_t_1 = 0;
- __pyx_r = __pyx_t_4;
- __pyx_t_4 = 0;
- goto __pyx_L0;
- }
-
- /* "(tree fragment)":1
- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
- * cdef tuple state
- * cdef object _dict
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5);
- __Pyx_AddTraceback("View.MemoryView.Enum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XDECREF(__pyx_v_state);
- __Pyx_XDECREF(__pyx_v__dict);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "(tree fragment)":16
- * else:
- * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
- * __pyx_unpickle_Enum__set_state(self, __pyx_state)
- */
-
-/* Python wrapper */
-static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
-static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
- __pyx_r = __pyx_pf___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__setstate_cython__", 0);
-
- /* "(tree fragment)":17
- * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
- * def __setstate_cython__(self, __pyx_state):
- * __pyx_unpickle_Enum__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
- */
- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
- __pyx_t_1 = __pyx_unpickle_Enum__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
- /* "(tree fragment)":16
- * else:
- * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
- * __pyx_unpickle_Enum__set_state(self, __pyx_state)
- */
-
- /* function exit code */
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":299
- *
- * @cname('__pyx_align_pointer')
- * cdef void *align_pointer(void *memory, size_t alignment) nogil: # <<<<<<<<<<<<<<
- * "Align pointer memory on a given boundary"
- * cdef Py_intptr_t aligned_p = memory
- */
-
-static void *__pyx_align_pointer(void *__pyx_v_memory, size_t __pyx_v_alignment) {
- Py_intptr_t __pyx_v_aligned_p;
- size_t __pyx_v_offset;
- void *__pyx_r;
- int __pyx_t_1;
-
- /* "View.MemoryView":301
- * cdef void *align_pointer(void *memory, size_t alignment) nogil:
- * "Align pointer memory on a given boundary"
- * cdef Py_intptr_t aligned_p = memory # <<<<<<<<<<<<<<
- * cdef size_t offset
- *
- */
- __pyx_v_aligned_p = ((Py_intptr_t)__pyx_v_memory);
-
- /* "View.MemoryView":305
- *
- * with cython.cdivision(True):
- * offset = aligned_p % alignment # <<<<<<<<<<<<<<
- *
- * if offset > 0:
- */
- __pyx_v_offset = (__pyx_v_aligned_p % __pyx_v_alignment);
-
- /* "View.MemoryView":307
- * offset = aligned_p % alignment
- *
- * if offset > 0: # <<<<<<<<<<<<<<
- * aligned_p += alignment - offset
- *
- */
- __pyx_t_1 = ((__pyx_v_offset > 0) != 0);
- if (__pyx_t_1) {
-
- /* "View.MemoryView":308
- *
- * if offset > 0:
- * aligned_p += alignment - offset # <<<<<<<<<<<<<<
- *
- * return aligned_p
- */
- __pyx_v_aligned_p = (__pyx_v_aligned_p + (__pyx_v_alignment - __pyx_v_offset));
-
- /* "View.MemoryView":307
- * offset = aligned_p % alignment
- *
- * if offset > 0: # <<<<<<<<<<<<<<
- * aligned_p += alignment - offset
- *
- */
- }
-
- /* "View.MemoryView":310
- * aligned_p += alignment - offset
- *
- * return aligned_p # <<<<<<<<<<<<<<
- *
- *
- */
- __pyx_r = ((void *)__pyx_v_aligned_p);
- goto __pyx_L0;
-
- /* "View.MemoryView":299
- *
- * @cname('__pyx_align_pointer')
- * cdef void *align_pointer(void *memory, size_t alignment) nogil: # <<<<<<<<<<<<<<
- * "Align pointer memory on a given boundary"
- * cdef Py_intptr_t aligned_p = memory
- */
-
- /* function exit code */
- __pyx_L0:;
- return __pyx_r;
-}
-
-/* "View.MemoryView":346
- * cdef __Pyx_TypeInfo *typeinfo
- *
- * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<<
- * self.obj = obj
- * self.flags = flags
- */
-
-/* Python wrapper */
-static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
- PyObject *__pyx_v_obj = 0;
- int __pyx_v_flags;
- int __pyx_v_dtype_is_object;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- int __pyx_r;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
- {
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_flags,&__pyx_n_s_dtype_is_object,0};
- PyObject* values[3] = {0,0,0};
- if (unlikely(__pyx_kwds)) {
- Py_ssize_t kw_args;
- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
- switch (pos_args) {
- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
- CYTHON_FALLTHROUGH;
- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
- CYTHON_FALLTHROUGH;
- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
- CYTHON_FALLTHROUGH;
- case 0: break;
- default: goto __pyx_L5_argtuple_error;
- }
- kw_args = PyDict_Size(__pyx_kwds);
- switch (pos_args) {
- case 0:
- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
- else goto __pyx_L5_argtuple_error;
- CYTHON_FALLTHROUGH;
- case 1:
- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags)) != 0)) kw_args--;
- else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(1, 346, __pyx_L3_error)
- }
- CYTHON_FALLTHROUGH;
- case 2:
- if (kw_args > 0) {
- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dtype_is_object);
- if (value) { values[2] = value; kw_args--; }
- }
- }
- if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 346, __pyx_L3_error)
- }
- } else {
- switch (PyTuple_GET_SIZE(__pyx_args)) {
- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
- CYTHON_FALLTHROUGH;
- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
- break;
- default: goto __pyx_L5_argtuple_error;
- }
- }
- __pyx_v_obj = values[0];
- __pyx_v_flags = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 346, __pyx_L3_error)
- if (values[2]) {
- __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 346, __pyx_L3_error)
- } else {
- __pyx_v_dtype_is_object = ((int)0);
- }
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 346, __pyx_L3_error)
- __pyx_L3_error:;
- __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return -1;
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_obj, __pyx_v_flags, __pyx_v_dtype_is_object);
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object) {
- int __pyx_r;
- __Pyx_RefNannyDeclarations
- int __pyx_t_1;
- int __pyx_t_2;
- int __pyx_t_3;
- int __pyx_t_4;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__cinit__", 0);
-
- /* "View.MemoryView":347
- *
- * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
- * self.obj = obj # <<<<<<<<<<<<<<
- * self.flags = flags
- * if type(self) is memoryview or obj is not None:
- */
- __Pyx_INCREF(__pyx_v_obj);
- __Pyx_GIVEREF(__pyx_v_obj);
- __Pyx_GOTREF(__pyx_v_self->obj);
- __Pyx_DECREF(__pyx_v_self->obj);
- __pyx_v_self->obj = __pyx_v_obj;
-
- /* "View.MemoryView":348
- * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
- * self.obj = obj
- * self.flags = flags # <<<<<<<<<<<<<<
- * if type(self) is memoryview or obj is not None:
- * __Pyx_GetBuffer(obj, &self.view, flags)
- */
- __pyx_v_self->flags = __pyx_v_flags;
-
- /* "View.MemoryView":349
- * self.obj = obj
- * self.flags = flags
- * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<<
- * __Pyx_GetBuffer(obj, &self.view, flags)
- * if self.view.obj == NULL:
- */
- __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_memoryview_type));
- __pyx_t_3 = (__pyx_t_2 != 0);
- if (!__pyx_t_3) {
- } else {
- __pyx_t_1 = __pyx_t_3;
- goto __pyx_L4_bool_binop_done;
- }
- __pyx_t_3 = (__pyx_v_obj != Py_None);
- __pyx_t_2 = (__pyx_t_3 != 0);
- __pyx_t_1 = __pyx_t_2;
- __pyx_L4_bool_binop_done:;
- if (__pyx_t_1) {
-
- /* "View.MemoryView":350
- * self.flags = flags
- * if type(self) is memoryview or obj is not None:
- * __Pyx_GetBuffer(obj, &self.view, flags) # <<<<<<<<<<<<<<
- * if self.view.obj == NULL:
- * (<__pyx_buffer *> &self.view).obj = Py_None
- */
- __pyx_t_4 = __Pyx_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 350, __pyx_L1_error)
-
- /* "View.MemoryView":351
- * if type(self) is memoryview or obj is not None:
- * __Pyx_GetBuffer(obj, &self.view, flags)
- * if self.view.obj == NULL: # <<<<<<<<<<<<<<
- * (<__pyx_buffer *> &self.view).obj = Py_None
- * Py_INCREF(Py_None)
- */
- __pyx_t_1 = ((((PyObject *)__pyx_v_self->view.obj) == NULL) != 0);
- if (__pyx_t_1) {
-
- /* "View.MemoryView":352
- * __Pyx_GetBuffer(obj, &self.view, flags)
- * if self.view.obj == NULL:
- * (<__pyx_buffer *> &self.view).obj = Py_None # <<<<<<<<<<<<<<
- * Py_INCREF(Py_None)
- *
- */
- ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None;
-
- /* "View.MemoryView":353
- * if self.view.obj == NULL:
- * (<__pyx_buffer *> &self.view).obj = Py_None
- * Py_INCREF(Py_None) # <<<<<<<<<<<<<<
- *
- * if not __PYX_CYTHON_ATOMICS_ENABLED():
- */
- Py_INCREF(Py_None);
-
- /* "View.MemoryView":351
- * if type(self) is memoryview or obj is not None:
- * __Pyx_GetBuffer(obj, &self.view, flags)
- * if self.view.obj == NULL: # <<<<<<<<<<<<<<
- * (<__pyx_buffer *> &self.view).obj = Py_None
- * Py_INCREF(Py_None)
- */
- }
-
- /* "View.MemoryView":349
- * self.obj = obj
- * self.flags = flags
- * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<<
- * __Pyx_GetBuffer(obj, &self.view, flags)
- * if self.view.obj == NULL:
- */
- }
-
- /* "View.MemoryView":355
- * Py_INCREF(Py_None)
- *
- * if not __PYX_CYTHON_ATOMICS_ENABLED(): # <<<<<<<<<<<<<<
- * global __pyx_memoryview_thread_locks_used
- * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
- */
- __pyx_t_1 = ((!(__PYX_CYTHON_ATOMICS_ENABLED() != 0)) != 0);
- if (__pyx_t_1) {
-
- /* "View.MemoryView":357
- * if not __PYX_CYTHON_ATOMICS_ENABLED():
- * global __pyx_memoryview_thread_locks_used
- * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED: # <<<<<<<<<<<<<<
- * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
- * __pyx_memoryview_thread_locks_used += 1
- */
- __pyx_t_1 = ((__pyx_memoryview_thread_locks_used < 8) != 0);
- if (__pyx_t_1) {
-
- /* "View.MemoryView":358
- * global __pyx_memoryview_thread_locks_used
- * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
- * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] # <<<<<<<<<<<<<<
- * __pyx_memoryview_thread_locks_used += 1
- * if self.lock is NULL:
- */
- __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
-
- /* "View.MemoryView":359
- * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
- * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
- * __pyx_memoryview_thread_locks_used += 1 # <<<<<<<<<<<<<<
- * if self.lock is NULL:
- * self.lock = PyThread_allocate_lock()
- */
- __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1);
-
- /* "View.MemoryView":357
- * if not __PYX_CYTHON_ATOMICS_ENABLED():
- * global __pyx_memoryview_thread_locks_used
- * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED: # <<<<<<<<<<<<<<
- * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
- * __pyx_memoryview_thread_locks_used += 1
- */
- }
-
- /* "View.MemoryView":360
- * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
- * __pyx_memoryview_thread_locks_used += 1
- * if self.lock is NULL: # <<<<<<<<<<<<<<
- * self.lock = PyThread_allocate_lock()
- * if self.lock is NULL:
- */
- __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);
- if (__pyx_t_1) {
-
- /* "View.MemoryView":361
- * __pyx_memoryview_thread_locks_used += 1
- * if self.lock is NULL:
- * self.lock = PyThread_allocate_lock() # <<<<<<<<<<<<<<
- * if self.lock is NULL:
- * raise MemoryError
- */
- __pyx_v_self->lock = PyThread_allocate_lock();
-
- /* "View.MemoryView":362
- * if self.lock is NULL:
- * self.lock = PyThread_allocate_lock()
- * if self.lock is NULL: # <<<<<<<<<<<<<<
- * raise MemoryError
- *
- */
- __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);
- if (unlikely(__pyx_t_1)) {
-
- /* "View.MemoryView":363
- * self.lock = PyThread_allocate_lock()
- * if self.lock is NULL:
- * raise MemoryError # <<<<<<<<<<<<<<
- *
- * if flags & PyBUF_FORMAT:
- */
- PyErr_NoMemory(); __PYX_ERR(1, 363, __pyx_L1_error)
-
- /* "View.MemoryView":362
- * if self.lock is NULL:
- * self.lock = PyThread_allocate_lock()
- * if self.lock is NULL: # <<<<<<<<<<<<<<
- * raise MemoryError
- *
- */
- }
-
- /* "View.MemoryView":360
- * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
- * __pyx_memoryview_thread_locks_used += 1
- * if self.lock is NULL: # <<<<<<<<<<<<<<
- * self.lock = PyThread_allocate_lock()
- * if self.lock is NULL:
- */
- }
-
- /* "View.MemoryView":355
- * Py_INCREF(Py_None)
- *
- * if not __PYX_CYTHON_ATOMICS_ENABLED(): # <<<<<<<<<<<<<<
- * global __pyx_memoryview_thread_locks_used
- * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
- */
- }
-
- /* "View.MemoryView":365
- * raise MemoryError
- *
- * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
- * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
- * else:
- */
- __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
- if (__pyx_t_1) {
-
- /* "View.MemoryView":366
- *
- * if flags & PyBUF_FORMAT:
- * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') # <<<<<<<<<<<<<<
- * else:
- * self.dtype_is_object = dtype_is_object
- */
- __pyx_t_2 = (((__pyx_v_self->view.format[0]) == 'O') != 0);
- if (__pyx_t_2) {
- } else {
- __pyx_t_1 = __pyx_t_2;
- goto __pyx_L12_bool_binop_done;
- }
- __pyx_t_2 = (((__pyx_v_self->view.format[1]) == '\x00') != 0);
- __pyx_t_1 = __pyx_t_2;
- __pyx_L12_bool_binop_done:;
- __pyx_v_self->dtype_is_object = __pyx_t_1;
-
- /* "View.MemoryView":365
- * raise MemoryError
- *
- * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
- * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
- * else:
- */
- goto __pyx_L11;
- }
-
- /* "View.MemoryView":368
- * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
- * else:
- * self.dtype_is_object = dtype_is_object # <<<<<<<<<<<<<<
- *
- * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(
- */
- /*else*/ {
- __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object;
- }
- __pyx_L11:;
-
- /* "View.MemoryView":370
- * self.dtype_is_object = dtype_is_object
- *
- * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer( # <<<<<<<<<<<<<<
- * &self.acquisition_count[0], sizeof(__pyx_atomic_int))
- * self.typeinfo = NULL
- */
- __pyx_v_self->acquisition_count_aligned_p = ((__pyx_atomic_int *)__pyx_align_pointer(((void *)(&(__pyx_v_self->acquisition_count[0]))), (sizeof(__pyx_atomic_int))));
-
- /* "View.MemoryView":372
- * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(
- * &self.acquisition_count[0], sizeof(__pyx_atomic_int))
- * self.typeinfo = NULL # <<<<<<<<<<<<<<
- *
- * def __dealloc__(memoryview self):
- */
- __pyx_v_self->typeinfo = NULL;
-
- /* "View.MemoryView":346
- * cdef __Pyx_TypeInfo *typeinfo
- *
- * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<<
- * self.obj = obj
- * self.flags = flags
- */
-
- /* function exit code */
- __pyx_r = 0;
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = -1;
- __pyx_L0:;
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":374
- * self.typeinfo = NULL
- *
- * def __dealloc__(memoryview self): # <<<<<<<<<<<<<<
- * if self.obj is not None:
- * __Pyx_ReleaseBuffer(&self.view)
- */
-
-/* Python wrapper */
-static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/
-static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) {
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
- __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
-}
-
-static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) {
- int __pyx_v_i;
- __Pyx_RefNannyDeclarations
- int __pyx_t_1;
- int __pyx_t_2;
- int __pyx_t_3;
- int __pyx_t_4;
- int __pyx_t_5;
- PyThread_type_lock __pyx_t_6;
- PyThread_type_lock __pyx_t_7;
- __Pyx_RefNannySetupContext("__dealloc__", 0);
-
- /* "View.MemoryView":375
- *
- * def __dealloc__(memoryview self):
- * if self.obj is not None: # <<<<<<<<<<<<<<
- * __Pyx_ReleaseBuffer(&self.view)
- * elif (<__pyx_buffer *> &self.view).obj == Py_None:
- */
- __pyx_t_1 = (__pyx_v_self->obj != Py_None);
- __pyx_t_2 = (__pyx_t_1 != 0);
- if (__pyx_t_2) {
-
- /* "View.MemoryView":376
- * def __dealloc__(memoryview self):
- * if self.obj is not None:
- * __Pyx_ReleaseBuffer(&self.view) # <<<<<<<<<<<<<<
- * elif (<__pyx_buffer *> &self.view).obj == Py_None:
- *
- */
- __Pyx_ReleaseBuffer((&__pyx_v_self->view));
-
- /* "View.MemoryView":375
- *
- * def __dealloc__(memoryview self):
- * if self.obj is not None: # <<<<<<<<<<<<<<
- * __Pyx_ReleaseBuffer(&self.view)
- * elif (<__pyx_buffer *> &self.view).obj == Py_None:
- */
- goto __pyx_L3;
- }
-
- /* "View.MemoryView":377
- * if self.obj is not None:
- * __Pyx_ReleaseBuffer(&self.view)
- * elif (<__pyx_buffer *> &self.view).obj == Py_None: # <<<<<<<<<<<<<<
- *
- * (<__pyx_buffer *> &self.view).obj = NULL
- */
- __pyx_t_2 = ((((Py_buffer *)(&__pyx_v_self->view))->obj == Py_None) != 0);
- if (__pyx_t_2) {
-
- /* "View.MemoryView":379
- * elif (<__pyx_buffer *> &self.view).obj == Py_None:
- *
- * (<__pyx_buffer *> &self.view).obj = NULL # <<<<<<<<<<<<<<
- * Py_DECREF(Py_None)
- *
- */
- ((Py_buffer *)(&__pyx_v_self->view))->obj = NULL;
-
- /* "View.MemoryView":380
- *
- * (<__pyx_buffer *> &self.view).obj = NULL
- * Py_DECREF(Py_None) # <<<<<<<<<<<<<<
- *
- * cdef int i
- */
- Py_DECREF(Py_None);
-
- /* "View.MemoryView":377
- * if self.obj is not None:
- * __Pyx_ReleaseBuffer(&self.view)
- * elif (<__pyx_buffer *> &self.view).obj == Py_None: # <<<<<<<<<<<<<<
- *
- * (<__pyx_buffer *> &self.view).obj = NULL
- */
- }
- __pyx_L3:;
-
- /* "View.MemoryView":384
- * cdef int i
- * global __pyx_memoryview_thread_locks_used
- * if self.lock != NULL: # <<<<<<<<<<<<<<
- * for i in range(__pyx_memoryview_thread_locks_used):
- * if __pyx_memoryview_thread_locks[i] is self.lock:
- */
- __pyx_t_2 = ((__pyx_v_self->lock != NULL) != 0);
- if (__pyx_t_2) {
-
- /* "View.MemoryView":385
- * global __pyx_memoryview_thread_locks_used
- * if self.lock != NULL:
- * for i in range(__pyx_memoryview_thread_locks_used): # <<<<<<<<<<<<<<
- * if __pyx_memoryview_thread_locks[i] is self.lock:
- * __pyx_memoryview_thread_locks_used -= 1
- */
- __pyx_t_3 = __pyx_memoryview_thread_locks_used;
- __pyx_t_4 = __pyx_t_3;
- for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
- __pyx_v_i = __pyx_t_5;
-
- /* "View.MemoryView":386
- * if self.lock != NULL:
- * for i in range(__pyx_memoryview_thread_locks_used):
- * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<<
- * __pyx_memoryview_thread_locks_used -= 1
- * if i != __pyx_memoryview_thread_locks_used:
- */
- __pyx_t_2 = (((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock) != 0);
- if (__pyx_t_2) {
-
- /* "View.MemoryView":387
- * for i in range(__pyx_memoryview_thread_locks_used):
- * if __pyx_memoryview_thread_locks[i] is self.lock:
- * __pyx_memoryview_thread_locks_used -= 1 # <<<<<<<<<<<<<<
- * if i != __pyx_memoryview_thread_locks_used:
- * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
- */
- __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1);
-
- /* "View.MemoryView":388
- * if __pyx_memoryview_thread_locks[i] is self.lock:
- * __pyx_memoryview_thread_locks_used -= 1
- * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<<
- * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
- * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
- */
- __pyx_t_2 = ((__pyx_v_i != __pyx_memoryview_thread_locks_used) != 0);
- if (__pyx_t_2) {
-
- /* "View.MemoryView":390
- * if i != __pyx_memoryview_thread_locks_used:
- * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
- * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) # <<<<<<<<<<<<<<
- * break
- * else:
- */
- __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
- __pyx_t_7 = (__pyx_memoryview_thread_locks[__pyx_v_i]);
-
- /* "View.MemoryView":389
- * __pyx_memoryview_thread_locks_used -= 1
- * if i != __pyx_memoryview_thread_locks_used:
- * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( # <<<<<<<<<<<<<<
- * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
- * break
- */
- (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_6;
- (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_7;
-
- /* "View.MemoryView":388
- * if __pyx_memoryview_thread_locks[i] is self.lock:
- * __pyx_memoryview_thread_locks_used -= 1
- * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<<
- * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
- * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
- */
- }
-
- /* "View.MemoryView":391
- * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
- * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
- * break # <<<<<<<<<<<<<<
- * else:
- * PyThread_free_lock(self.lock)
- */
- goto __pyx_L6_break;
-
- /* "View.MemoryView":386
- * if self.lock != NULL:
- * for i in range(__pyx_memoryview_thread_locks_used):
- * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<<
- * __pyx_memoryview_thread_locks_used -= 1
- * if i != __pyx_memoryview_thread_locks_used:
- */
- }
- }
- /*else*/ {
-
- /* "View.MemoryView":393
- * break
- * else:
- * PyThread_free_lock(self.lock) # <<<<<<<<<<<<<<
- *
- * cdef char *get_item_pointer(memoryview self, object index) except NULL:
- */
- PyThread_free_lock(__pyx_v_self->lock);
- }
- __pyx_L6_break:;
-
- /* "View.MemoryView":384
- * cdef int i
- * global __pyx_memoryview_thread_locks_used
- * if self.lock != NULL: # <<<<<<<<<<<<<<
- * for i in range(__pyx_memoryview_thread_locks_used):
- * if __pyx_memoryview_thread_locks[i] is self.lock:
- */
- }
-
- /* "View.MemoryView":374
- * self.typeinfo = NULL
- *
- * def __dealloc__(memoryview self): # <<<<<<<<<<<<<<
- * if self.obj is not None:
- * __Pyx_ReleaseBuffer(&self.view)
- */
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
-}
-
-/* "View.MemoryView":395
- * PyThread_free_lock(self.lock)
- *
- * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<<
- * cdef Py_ssize_t dim
- * cdef char *itemp = self.view.buf
- */
-
-static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
- Py_ssize_t __pyx_v_dim;
- char *__pyx_v_itemp;
- PyObject *__pyx_v_idx = NULL;
- char *__pyx_r;
- __Pyx_RefNannyDeclarations
- Py_ssize_t __pyx_t_1;
- PyObject *__pyx_t_2 = NULL;
- Py_ssize_t __pyx_t_3;
- PyObject *(*__pyx_t_4)(PyObject *);
- PyObject *__pyx_t_5 = NULL;
- Py_ssize_t __pyx_t_6;
- char *__pyx_t_7;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("get_item_pointer", 0);
-
- /* "View.MemoryView":397
- * cdef char *get_item_pointer(memoryview self, object index) except NULL:
- * cdef Py_ssize_t dim
- * cdef char *itemp = self.view.buf # <<<<<<<<<<<<<<
- *
- * for dim, idx in enumerate(index):
- */
- __pyx_v_itemp = ((char *)__pyx_v_self->view.buf);
-
- /* "View.MemoryView":399
- * cdef char *itemp = self.view.buf
- *
- * for dim, idx in enumerate(index): # <<<<<<<<<<<<<<
- * itemp = pybuffer_index(&self.view, itemp, idx, dim)
- *
- */
- __pyx_t_1 = 0;
- if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) {
- __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
- __pyx_t_4 = NULL;
- } else {
- __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 399, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 399, __pyx_L1_error)
- }
- for (;;) {
- if (likely(!__pyx_t_4)) {
- if (likely(PyList_CheckExact(__pyx_t_2))) {
- if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 399, __pyx_L1_error)
- #else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 399, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- #endif
- } else {
- if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 399, __pyx_L1_error)
- #else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 399, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- #endif
- }
- } else {
- __pyx_t_5 = __pyx_t_4(__pyx_t_2);
- if (unlikely(!__pyx_t_5)) {
- PyObject* exc_type = PyErr_Occurred();
- if (exc_type) {
- if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
- else __PYX_ERR(1, 399, __pyx_L1_error)
- }
- break;
- }
- __Pyx_GOTREF(__pyx_t_5);
- }
- __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);
- __pyx_t_5 = 0;
- __pyx_v_dim = __pyx_t_1;
- __pyx_t_1 = (__pyx_t_1 + 1);
-
- /* "View.MemoryView":400
- *
- * for dim, idx in enumerate(index):
- * itemp = pybuffer_index(&self.view, itemp, idx, dim) # <<<<<<<<<<<<<<
- *
- * return itemp
- */
- __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 400, __pyx_L1_error)
- __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(1, 400, __pyx_L1_error)
- __pyx_v_itemp = __pyx_t_7;
-
- /* "View.MemoryView":399
- * cdef char *itemp = self.view.buf
- *
- * for dim, idx in enumerate(index): # <<<<<<<<<<<<<<
- * itemp = pybuffer_index(&self.view, itemp, idx, dim)
- *
- */
- }
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
- /* "View.MemoryView":402
- * itemp = pybuffer_index(&self.view, itemp, idx, dim)
- *
- * return itemp # <<<<<<<<<<<<<<
- *
- *
- */
- __pyx_r = __pyx_v_itemp;
- goto __pyx_L0;
-
- /* "View.MemoryView":395
- * PyThread_free_lock(self.lock)
- *
- * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<<
- * cdef Py_ssize_t dim
- * cdef char *itemp = self.view.buf
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_5);
- __Pyx_AddTraceback("View.MemoryView.memoryview.get_item_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XDECREF(__pyx_v_idx);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":405
- *
- *
- * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<<
- * if index is Ellipsis:
- * return self
- */
-
-/* Python wrapper */
-static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
-static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
- __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
- PyObject *__pyx_v_have_slices = NULL;
- PyObject *__pyx_v_indices = NULL;
- char *__pyx_v_itemp;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- int __pyx_t_1;
- int __pyx_t_2;
- PyObject *__pyx_t_3 = NULL;
- PyObject *__pyx_t_4 = NULL;
- PyObject *__pyx_t_5 = NULL;
- char *__pyx_t_6;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__getitem__", 0);
-
- /* "View.MemoryView":406
- *
- * def __getitem__(memoryview self, object index):
- * if index is Ellipsis: # <<<<<<<<<<<<<<
- * return self
- *
- */
- __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis);
- __pyx_t_2 = (__pyx_t_1 != 0);
- if (__pyx_t_2) {
-
- /* "View.MemoryView":407
- * def __getitem__(memoryview self, object index):
- * if index is Ellipsis:
- * return self # <<<<<<<<<<<<<<
- *
- * have_slices, indices = _unellipsify(index, self.view.ndim)
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(((PyObject *)__pyx_v_self));
- __pyx_r = ((PyObject *)__pyx_v_self);
- goto __pyx_L0;
-
- /* "View.MemoryView":406
- *
- * def __getitem__(memoryview self, object index):
- * if index is Ellipsis: # <<<<<<<<<<<<<<
- * return self
- *
- */
- }
-
- /* "View.MemoryView":409
- * return self
- *
- * have_slices, indices = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<<
- *
- * cdef char *itemp
- */
- __pyx_t_3 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 409, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- if (likely(__pyx_t_3 != Py_None)) {
- PyObject* sequence = __pyx_t_3;
- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
- if (unlikely(size != 2)) {
- if (size > 2) __Pyx_RaiseTooManyValuesError(2);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(1, 409, __pyx_L1_error)
- }
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
- __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1);
- __Pyx_INCREF(__pyx_t_4);
- __Pyx_INCREF(__pyx_t_5);
- #else
- __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 409, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 409, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- #endif
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- } else {
- __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 409, __pyx_L1_error)
- }
- __pyx_v_have_slices = __pyx_t_4;
- __pyx_t_4 = 0;
- __pyx_v_indices = __pyx_t_5;
- __pyx_t_5 = 0;
-
- /* "View.MemoryView":412
- *
- * cdef char *itemp
- * if have_slices: # <<<<<<<<<<<<<<
- * return memview_slice(self, indices)
- * else:
- */
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 412, __pyx_L1_error)
- if (__pyx_t_2) {
-
- /* "View.MemoryView":413
- * cdef char *itemp
- * if have_slices:
- * return memview_slice(self, indices) # <<<<<<<<<<<<<<
- * else:
- * itemp = self.get_item_pointer(indices)
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_3 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 413, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_r = __pyx_t_3;
- __pyx_t_3 = 0;
- goto __pyx_L0;
-
- /* "View.MemoryView":412
- *
- * cdef char *itemp
- * if have_slices: # <<<<<<<<<<<<<<
- * return memview_slice(self, indices)
- * else:
- */
- }
-
- /* "View.MemoryView":415
- * return memview_slice(self, indices)
- * else:
- * itemp = self.get_item_pointer(indices) # <<<<<<<<<<<<<<
- * return self.convert_item_to_object(itemp)
- *
- */
- /*else*/ {
- __pyx_t_6 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_6 == ((char *)NULL))) __PYX_ERR(1, 415, __pyx_L1_error)
- __pyx_v_itemp = __pyx_t_6;
-
- /* "View.MemoryView":416
- * else:
- * itemp = self.get_item_pointer(indices)
- * return self.convert_item_to_object(itemp) # <<<<<<<<<<<<<<
- *
- * def __setitem__(memoryview self, object index, object value):
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 416, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_r = __pyx_t_3;
- __pyx_t_3 = 0;
- goto __pyx_L0;
- }
-
- /* "View.MemoryView":405
- *
- *
- * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<<
- * if index is Ellipsis:
- * return self
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5);
- __Pyx_AddTraceback("View.MemoryView.memoryview.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XDECREF(__pyx_v_have_slices);
- __Pyx_XDECREF(__pyx_v_indices);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":418
- * return self.convert_item_to_object(itemp)
- *
- * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<<
- * if self.view.readonly:
- * raise TypeError("Cannot assign to read-only memoryview")
- */
-
-/* Python wrapper */
-static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
-static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
- int __pyx_r;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
- __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
- PyObject *__pyx_v_have_slices = NULL;
- PyObject *__pyx_v_obj = NULL;
- int __pyx_r;
- __Pyx_RefNannyDeclarations
- int __pyx_t_1;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
- PyObject *__pyx_t_4 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__setitem__", 0);
- __Pyx_INCREF(__pyx_v_index);
-
- /* "View.MemoryView":419
- *
- * def __setitem__(memoryview self, object index, object value):
- * if self.view.readonly: # <<<<<<<<<<<<<<
- * raise TypeError("Cannot assign to read-only memoryview")
- *
- */
- __pyx_t_1 = (__pyx_v_self->view.readonly != 0);
- if (unlikely(__pyx_t_1)) {
-
- /* "View.MemoryView":420
- * def __setitem__(memoryview self, object index, object value):
- * if self.view.readonly:
- * raise TypeError("Cannot assign to read-only memoryview") # <<<<<<<<<<<<<<
- *
- * have_slices, index = _unellipsify(index, self.view.ndim)
- */
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 420, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_Raise(__pyx_t_2, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(1, 420, __pyx_L1_error)
-
- /* "View.MemoryView":419
- *
- * def __setitem__(memoryview self, object index, object value):
- * if self.view.readonly: # <<<<<<<<<<<<<<
- * raise TypeError("Cannot assign to read-only memoryview")
- *
- */
- }
-
- /* "View.MemoryView":422
- * raise TypeError("Cannot assign to read-only memoryview")
- *
- * have_slices, index = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<<
- *
- * if have_slices:
- */
- __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 422, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- if (likely(__pyx_t_2 != Py_None)) {
- PyObject* sequence = __pyx_t_2;
- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
- if (unlikely(size != 2)) {
- if (size > 2) __Pyx_RaiseTooManyValuesError(2);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(1, 422, __pyx_L1_error)
- }
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
- __Pyx_INCREF(__pyx_t_3);
- __Pyx_INCREF(__pyx_t_4);
- #else
- __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 422, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 422, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- #endif
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- } else {
- __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 422, __pyx_L1_error)
- }
- __pyx_v_have_slices = __pyx_t_3;
- __pyx_t_3 = 0;
- __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_4);
- __pyx_t_4 = 0;
-
- /* "View.MemoryView":424
- * have_slices, index = _unellipsify(index, self.view.ndim)
- *
- * if have_slices: # <<<<<<<<<<<<<<
- * obj = self.is_slice(value)
- * if obj:
- */
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 424, __pyx_L1_error)
- if (__pyx_t_1) {
-
- /* "View.MemoryView":425
- *
- * if have_slices:
- * obj = self.is_slice(value) # <<<<<<<<<<<<<<
- * if obj:
- * self.setitem_slice_assignment(self[index], obj)
- */
- __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 425, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_v_obj = __pyx_t_2;
- __pyx_t_2 = 0;
-
- /* "View.MemoryView":426
- * if have_slices:
- * obj = self.is_slice(value)
- * if obj: # <<<<<<<<<<<<<<
- * self.setitem_slice_assignment(self[index], obj)
- * else:
- */
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 426, __pyx_L1_error)
- if (__pyx_t_1) {
-
- /* "View.MemoryView":427
- * obj = self.is_slice(value)
- * if obj:
- * self.setitem_slice_assignment(self[index], obj) # <<<<<<<<<<<<<<
- * else:
- * self.setitem_slice_assign_scalar(self[index], value)
- */
- __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 427, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_2, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 427, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
- /* "View.MemoryView":426
- * if have_slices:
- * obj = self.is_slice(value)
- * if obj: # <<<<<<<<<<<<<<
- * self.setitem_slice_assignment(self[index], obj)
- * else:
- */
- goto __pyx_L5;
- }
-
- /* "View.MemoryView":429
- * self.setitem_slice_assignment(self[index], obj)
- * else:
- * self.setitem_slice_assign_scalar(self[index], value) # <<<<<<<<<<<<<<
- * else:
- * self.setitem_indexed(index, value)
- */
- /*else*/ {
- __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 429, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_memoryview_type))))) __PYX_ERR(1, 429, __pyx_L1_error)
- __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_4), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 429, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- }
- __pyx_L5:;
-
- /* "View.MemoryView":424
- * have_slices, index = _unellipsify(index, self.view.ndim)
- *
- * if have_slices: # <<<<<<<<<<<<<<
- * obj = self.is_slice(value)
- * if obj:
- */
- goto __pyx_L4;
- }
-
- /* "View.MemoryView":431
- * self.setitem_slice_assign_scalar(self[index], value)
- * else:
- * self.setitem_indexed(index, value) # <<<<<<<<<<<<<<
- *
- * cdef is_slice(self, obj):
- */
- /*else*/ {
- __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 431, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- }
- __pyx_L4:;
-
- /* "View.MemoryView":418
- * return self.convert_item_to_object(itemp)
- *
- * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<<
- * if self.view.readonly:
- * raise TypeError("Cannot assign to read-only memoryview")
- */
-
- /* function exit code */
- __pyx_r = 0;
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = -1;
- __pyx_L0:;
- __Pyx_XDECREF(__pyx_v_have_slices);
- __Pyx_XDECREF(__pyx_v_obj);
- __Pyx_XDECREF(__pyx_v_index);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":433
- * self.setitem_indexed(index, value)
- *
- * cdef is_slice(self, obj): # <<<<<<<<<<<<<<
- * if not isinstance(obj, memoryview):
- * try:
- */
-
-static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- int __pyx_t_1;
- int __pyx_t_2;
- PyObject *__pyx_t_3 = NULL;
- PyObject *__pyx_t_4 = NULL;
- PyObject *__pyx_t_5 = NULL;
- PyObject *__pyx_t_6 = NULL;
- PyObject *__pyx_t_7 = NULL;
- PyObject *__pyx_t_8 = NULL;
- int __pyx_t_9;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("is_slice", 0);
- __Pyx_INCREF(__pyx_v_obj);
-
- /* "View.MemoryView":434
- *
- * cdef is_slice(self, obj):
- * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<<
- * try:
- * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
- */
- __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_memoryview_type);
- __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
- if (__pyx_t_2) {
-
- /* "View.MemoryView":435
- * cdef is_slice(self, obj):
- * if not isinstance(obj, memoryview):
- * try: # <<<<<<<<<<<<<<
- * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
- * self.dtype_is_object)
- */
- {
- __Pyx_PyThreadState_declare
- __Pyx_PyThreadState_assign
- __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
- __Pyx_XGOTREF(__pyx_t_3);
- __Pyx_XGOTREF(__pyx_t_4);
- __Pyx_XGOTREF(__pyx_t_5);
- /*try:*/ {
-
- /* "View.MemoryView":436
- * if not isinstance(obj, memoryview):
- * try:
- * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<<
- * self.dtype_is_object)
- * except TypeError:
- */
- __pyx_t_6 = __Pyx_PyInt_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 436, __pyx_L4_error)
- __Pyx_GOTREF(__pyx_t_6);
-
- /* "View.MemoryView":437
- * try:
- * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
- * self.dtype_is_object) # <<<<<<<<<<<<<<
- * except TypeError:
- * return None
- */
- __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 437, __pyx_L4_error)
- __Pyx_GOTREF(__pyx_t_7);
-
- /* "View.MemoryView":436
- * if not isinstance(obj, memoryview):
- * try:
- * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<<
- * self.dtype_is_object)
- * except TypeError:
- */
- __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 436, __pyx_L4_error)
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_INCREF(__pyx_v_obj);
- __Pyx_GIVEREF(__pyx_v_obj);
- PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_obj);
- __Pyx_GIVEREF(__pyx_t_6);
- PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
- __Pyx_GIVEREF(__pyx_t_7);
- PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
- __pyx_t_6 = 0;
- __pyx_t_7 = 0;
- __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 436, __pyx_L4_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_7);
- __pyx_t_7 = 0;
-
- /* "View.MemoryView":435
- * cdef is_slice(self, obj):
- * if not isinstance(obj, memoryview):
- * try: # <<<<<<<<<<<<<<
- * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
- * self.dtype_is_object)
- */
- }
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- goto __pyx_L9_try_end;
- __pyx_L4_error:;
- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
-
- /* "View.MemoryView":438
- * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
- * self.dtype_is_object)
- * except TypeError: # <<<<<<<<<<<<<<
- * return None
- *
- */
- __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
- if (__pyx_t_9) {
- __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(1, 438, __pyx_L6_except_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_GOTREF(__pyx_t_6);
-
- /* "View.MemoryView":439
- * self.dtype_is_object)
- * except TypeError:
- * return None # <<<<<<<<<<<<<<
- *
- * return obj
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- goto __pyx_L7_except_return;
- }
- goto __pyx_L6_except_error;
- __pyx_L6_except_error:;
-
- /* "View.MemoryView":435
- * cdef is_slice(self, obj):
- * if not isinstance(obj, memoryview):
- * try: # <<<<<<<<<<<<<<
- * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
- * self.dtype_is_object)
- */
- __Pyx_XGIVEREF(__pyx_t_3);
- __Pyx_XGIVEREF(__pyx_t_4);
- __Pyx_XGIVEREF(__pyx_t_5);
- __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
- goto __pyx_L1_error;
- __pyx_L7_except_return:;
- __Pyx_XGIVEREF(__pyx_t_3);
- __Pyx_XGIVEREF(__pyx_t_4);
- __Pyx_XGIVEREF(__pyx_t_5);
- __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
- goto __pyx_L0;
- __pyx_L9_try_end:;
- }
-
- /* "View.MemoryView":434
- *
- * cdef is_slice(self, obj):
- * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<<
- * try:
- * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
- */
- }
-
- /* "View.MemoryView":441
- * return None
- *
- * return obj # <<<<<<<<<<<<<<
- *
- * cdef setitem_slice_assignment(self, dst, src):
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(__pyx_v_obj);
- __pyx_r = __pyx_v_obj;
- goto __pyx_L0;
-
- /* "View.MemoryView":433
- * self.setitem_indexed(index, value)
- *
- * cdef is_slice(self, obj): # <<<<<<<<<<<<<<
- * if not isinstance(obj, memoryview):
- * try:
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_6);
- __Pyx_XDECREF(__pyx_t_7);
- __Pyx_XDECREF(__pyx_t_8);
- __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = 0;
- __pyx_L0:;
- __Pyx_XDECREF(__pyx_v_obj);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":443
- * return obj
- *
- * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<<
- * cdef __Pyx_memviewslice dst_slice
- * cdef __Pyx_memviewslice src_slice
- */
-
-static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) {
- __Pyx_memviewslice __pyx_v_dst_slice;
- __Pyx_memviewslice __pyx_v_src_slice;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- __Pyx_memviewslice *__pyx_t_1;
- __Pyx_memviewslice *__pyx_t_2;
- PyObject *__pyx_t_3 = NULL;
- int __pyx_t_4;
- int __pyx_t_5;
- int __pyx_t_6;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("setitem_slice_assignment", 0);
-
- /* "View.MemoryView":447
- * cdef __Pyx_memviewslice src_slice
- *
- * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], # <<<<<<<<<<<<<<
- * get_slice_from_memview(dst, &dst_slice)[0],
- * src.ndim, dst.ndim, self.dtype_is_object)
- */
- if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type))))) __PYX_ERR(1, 447, __pyx_L1_error)
- __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 447, __pyx_L1_error)
-
- /* "View.MemoryView":448
- *
- * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
- * get_slice_from_memview(dst, &dst_slice)[0], # <<<<<<<<<<<<<<
- * src.ndim, dst.ndim, self.dtype_is_object)
- *
- */
- if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type))))) __PYX_ERR(1, 448, __pyx_L1_error)
- __pyx_t_2 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice)); if (unlikely(__pyx_t_2 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 448, __pyx_L1_error)
-
- /* "View.MemoryView":449
- * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
- * get_slice_from_memview(dst, &dst_slice)[0],
- * src.ndim, dst.ndim, self.dtype_is_object) # <<<<<<<<<<<<<<
- *
- * cdef setitem_slice_assign_scalar(self, memoryview dst, value):
- */
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 449, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 449, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 449, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 449, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-
- /* "View.MemoryView":447
- * cdef __Pyx_memviewslice src_slice
- *
- * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], # <<<<<<<<<<<<<<
- * get_slice_from_memview(dst, &dst_slice)[0],
- * src.ndim, dst.ndim, self.dtype_is_object)
- */
- __pyx_t_6 = __pyx_memoryview_copy_contents((__pyx_t_1[0]), (__pyx_t_2[0]), __pyx_t_4, __pyx_t_5, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 447, __pyx_L1_error)
-
- /* "View.MemoryView":443
- * return obj
- *
- * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<<
- * cdef __Pyx_memviewslice dst_slice
- * cdef __Pyx_memviewslice src_slice
- */
-
- /* function exit code */
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = 0;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":451
- * src.ndim, dst.ndim, self.dtype_is_object)
- *
- * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<<
- * cdef int array[128]
- * cdef void *tmp = NULL
- */
-
-static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value) {
- int __pyx_v_array[0x80];
- void *__pyx_v_tmp;
- void *__pyx_v_item;
- __Pyx_memviewslice *__pyx_v_dst_slice;
- __Pyx_memviewslice __pyx_v_tmp_slice;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- __Pyx_memviewslice *__pyx_t_1;
- int __pyx_t_2;
- PyObject *__pyx_t_3 = NULL;
- int __pyx_t_4;
- int __pyx_t_5;
- char const *__pyx_t_6;
- PyObject *__pyx_t_7 = NULL;
- PyObject *__pyx_t_8 = NULL;
- PyObject *__pyx_t_9 = NULL;
- PyObject *__pyx_t_10 = NULL;
- PyObject *__pyx_t_11 = NULL;
- PyObject *__pyx_t_12 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 0);
-
- /* "View.MemoryView":453
- * cdef setitem_slice_assign_scalar(self, memoryview dst, value):
- * cdef int array[128]
- * cdef void *tmp = NULL # <<<<<<<<<<<<<<
- * cdef void *item
- *
- */
- __pyx_v_tmp = NULL;
-
- /* "View.MemoryView":458
- * cdef __Pyx_memviewslice *dst_slice
- * cdef __Pyx_memviewslice tmp_slice
- * dst_slice = get_slice_from_memview(dst, &tmp_slice) # <<<<<<<<<<<<<<
- *
- * if self.view.itemsize > sizeof(array):
- */
- __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 458, __pyx_L1_error)
- __pyx_v_dst_slice = __pyx_t_1;
-
- /* "View.MemoryView":460
- * dst_slice = get_slice_from_memview(dst, &tmp_slice)
- *
- * if self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<<
- * tmp = PyMem_Malloc(self.view.itemsize)
- * if tmp == NULL:
- */
- __pyx_t_2 = ((((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array))) != 0);
- if (__pyx_t_2) {
-
- /* "View.MemoryView":461
- *
- * if self.view.itemsize > sizeof(array):
- * tmp = PyMem_Malloc(self.view.itemsize) # <<<<<<<<<<<<<<
- * if tmp == NULL:
- * raise MemoryError
- */
- __pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize);
-
- /* "View.MemoryView":462
- * if self.view.itemsize > sizeof(array):
- * tmp = PyMem_Malloc(self.view.itemsize)
- * if tmp == NULL: # <<<<<<<<<<<<<<
- * raise MemoryError
- * item = tmp
- */
- __pyx_t_2 = ((__pyx_v_tmp == NULL) != 0);
- if (unlikely(__pyx_t_2)) {
-
- /* "View.MemoryView":463
- * tmp = PyMem_Malloc(self.view.itemsize)
- * if tmp == NULL:
- * raise MemoryError # <<<<<<<<<<<<<<
- * item = tmp
- * else:
- */
- PyErr_NoMemory(); __PYX_ERR(1, 463, __pyx_L1_error)
-
- /* "View.MemoryView":462
- * if self.view.itemsize > sizeof(array):
- * tmp = PyMem_Malloc(self.view.itemsize)
- * if tmp == NULL: # <<<<<<<<<<<<<<
- * raise MemoryError
- * item = tmp
- */
- }
-
- /* "View.MemoryView":464
- * if tmp == NULL:
- * raise MemoryError
- * item = tmp # <<<<<<<<<<<<<<
- * else:
- * item = array
- */
- __pyx_v_item = __pyx_v_tmp;
-
- /* "View.MemoryView":460
- * dst_slice = get_slice_from_memview(dst, &tmp_slice)
- *
- * if self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<<
- * tmp = PyMem_Malloc(self.view.itemsize)
- * if tmp == NULL:
- */
- goto __pyx_L3;
- }
-
- /* "View.MemoryView":466
- * item = tmp
- * else:
- * item = array # <<<<<<<<<<<<<<
- *
- * try:
- */
- /*else*/ {
- __pyx_v_item = ((void *)__pyx_v_array);
- }
- __pyx_L3:;
-
- /* "View.MemoryView":468
- * item = array
- *
- * try: # <<<<<<<<<<<<<<
- * if self.dtype_is_object:
- * ( item)[0] = value
- */
- /*try:*/ {
-
- /* "View.MemoryView":469
- *
- * try:
- * if self.dtype_is_object: # <<<<<<<<<<<<<<
- * ( item)[0] = value
- * else:
- */
- __pyx_t_2 = (__pyx_v_self->dtype_is_object != 0);
- if (__pyx_t_2) {
-
- /* "View.MemoryView":470
- * try:
- * if self.dtype_is_object:
- * ( item)[0] = value # <<<<<<<<<<<<<<
- * else:
- * self.assign_item_from_object( item, value)
- */
- (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value);
-
- /* "View.MemoryView":469
- *
- * try:
- * if self.dtype_is_object: # <<<<<<<<<<<<<<
- * ( item)[0] = value
- * else:
- */
- goto __pyx_L8;
- }
-
- /* "View.MemoryView":472
- * ( item)[0] = value
- * else:
- * self.assign_item_from_object( item, value) # <<<<<<<<<<<<<<
- *
- *
- */
- /*else*/ {
- __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 472, __pyx_L6_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- }
- __pyx_L8:;
-
- /* "View.MemoryView":476
- *
- *
- * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<<
- * assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
- * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
- */
- __pyx_t_2 = ((__pyx_v_self->view.suboffsets != NULL) != 0);
- if (__pyx_t_2) {
-
- /* "View.MemoryView":477
- *
- * if self.view.suboffsets != NULL:
- * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) # <<<<<<<<<<<<<<
- * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
- * item, self.dtype_is_object)
- */
- __pyx_t_3 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 477, __pyx_L6_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-
- /* "View.MemoryView":476
- *
- *
- * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<<
- * assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
- * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
- */
- }
-
- /* "View.MemoryView":478
- * if self.view.suboffsets != NULL:
- * assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
- * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, # <<<<<<<<<<<<<<
- * item, self.dtype_is_object)
- * finally:
- */
- __pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, __pyx_v_self->view.itemsize, __pyx_v_item, __pyx_v_self->dtype_is_object);
- }
-
- /* "View.MemoryView":481
- * item, self.dtype_is_object)
- * finally:
- * PyMem_Free(tmp) # <<<<<<<<<<<<<<
- *
- * cdef setitem_indexed(self, index, value):
- */
- /*finally:*/ {
- /*normal exit:*/{
- PyMem_Free(__pyx_v_tmp);
- goto __pyx_L7;
- }
- __pyx_L6_error:;
- /*exception exit:*/{
- __Pyx_PyThreadState_declare
- __Pyx_PyThreadState_assign
- __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
- if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
- __Pyx_XGOTREF(__pyx_t_7);
- __Pyx_XGOTREF(__pyx_t_8);
- __Pyx_XGOTREF(__pyx_t_9);
- __Pyx_XGOTREF(__pyx_t_10);
- __Pyx_XGOTREF(__pyx_t_11);
- __Pyx_XGOTREF(__pyx_t_12);
- __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename;
- {
- PyMem_Free(__pyx_v_tmp);
- }
- if (PY_MAJOR_VERSION >= 3) {
- __Pyx_XGIVEREF(__pyx_t_10);
- __Pyx_XGIVEREF(__pyx_t_11);
- __Pyx_XGIVEREF(__pyx_t_12);
- __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
- }
- __Pyx_XGIVEREF(__pyx_t_7);
- __Pyx_XGIVEREF(__pyx_t_8);
- __Pyx_XGIVEREF(__pyx_t_9);
- __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
- __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
- __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6;
- goto __pyx_L1_error;
- }
- __pyx_L7:;
- }
-
- /* "View.MemoryView":451
- * src.ndim, dst.ndim, self.dtype_is_object)
- *
- * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<<
- * cdef int array[128]
- * cdef void *tmp = NULL
- */
-
- /* function exit code */
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = 0;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":483
- * PyMem_Free(tmp)
- *
- * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<<
- * cdef char *itemp = self.get_item_pointer(index)
- * self.assign_item_from_object(itemp, value)
- */
-
-static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
- char *__pyx_v_itemp;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- char *__pyx_t_1;
- PyObject *__pyx_t_2 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("setitem_indexed", 0);
-
- /* "View.MemoryView":484
- *
- * cdef setitem_indexed(self, index, value):
- * cdef char *itemp = self.get_item_pointer(index) # <<<<<<<<<<<<<<
- * self.assign_item_from_object(itemp, value)
- *
- */
- __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(1, 484, __pyx_L1_error)
- __pyx_v_itemp = __pyx_t_1;
-
- /* "View.MemoryView":485
- * cdef setitem_indexed(self, index, value):
- * cdef char *itemp = self.get_item_pointer(index)
- * self.assign_item_from_object(itemp, value) # <<<<<<<<<<<<<<
- *
- * cdef convert_item_to_object(self, char *itemp):
- */
- __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 485, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
- /* "View.MemoryView":483
- * PyMem_Free(tmp)
- *
- * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<<
- * cdef char *itemp = self.get_item_pointer(index)
- * self.assign_item_from_object(itemp, value)
- */
-
- /* function exit code */
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = 0;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":487
- * self.assign_item_from_object(itemp, value)
- *
- * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
- * """Only used if instantiated manually by the user, or if Cython doesn't
- * know how to convert the type"""
- */
-
-static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) {
- PyObject *__pyx_v_struct = NULL;
- PyObject *__pyx_v_bytesitem = 0;
- PyObject *__pyx_v_result = NULL;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
- PyObject *__pyx_t_4 = NULL;
- PyObject *__pyx_t_5 = NULL;
- PyObject *__pyx_t_6 = NULL;
- PyObject *__pyx_t_7 = NULL;
- int __pyx_t_8;
- PyObject *__pyx_t_9 = NULL;
- size_t __pyx_t_10;
- int __pyx_t_11;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("convert_item_to_object", 0);
-
- /* "View.MemoryView":490
- * """Only used if instantiated manually by the user, or if Cython doesn't
- * know how to convert the type"""
- * import struct # <<<<<<<<<<<<<<
- * cdef bytes bytesitem
- *
- */
- __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 490, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_v_struct = __pyx_t_1;
- __pyx_t_1 = 0;
-
- /* "View.MemoryView":493
- * cdef bytes bytesitem
- *
- * bytesitem = itemp[:self.view.itemsize] # <<<<<<<<<<<<<<
- * try:
- * result = struct.unpack(self.view.format, bytesitem)
- */
- __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 493, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_v_bytesitem = ((PyObject*)__pyx_t_1);
- __pyx_t_1 = 0;
-
- /* "View.MemoryView":494
- *
- * bytesitem = itemp[:self.view.itemsize]
- * try: # <<<<<<<<<<<<<<
- * result = struct.unpack(self.view.format, bytesitem)
- * except struct.error:
- */
- {
- __Pyx_PyThreadState_declare
- __Pyx_PyThreadState_assign
- __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
- __Pyx_XGOTREF(__pyx_t_2);
- __Pyx_XGOTREF(__pyx_t_3);
- __Pyx_XGOTREF(__pyx_t_4);
- /*try:*/ {
-
- /* "View.MemoryView":495
- * bytesitem = itemp[:self.view.itemsize]
- * try:
- * result = struct.unpack(self.view.format, bytesitem) # <<<<<<<<<<<<<<
- * except struct.error:
- * raise ValueError("Unable to convert item to object")
- */
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 495, __pyx_L3_error)
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 495, __pyx_L3_error)
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = NULL;
- __pyx_t_8 = 0;
- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
- __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
- if (likely(__pyx_t_7)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
- __Pyx_INCREF(__pyx_t_7);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_5, function);
- __pyx_t_8 = 1;
- }
- }
- #if CYTHON_FAST_PYCALL
- if (PyFunction_Check(__pyx_t_5)) {
- PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 495, __pyx_L3_error)
- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- } else
- #endif
- #if CYTHON_FAST_PYCCALL
- if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
- PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 495, __pyx_L3_error)
- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- } else
- #endif
- {
- __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 495, __pyx_L3_error)
- __Pyx_GOTREF(__pyx_t_9);
- if (__pyx_t_7) {
- __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
- }
- __Pyx_GIVEREF(__pyx_t_6);
- PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
- __Pyx_INCREF(__pyx_v_bytesitem);
- __Pyx_GIVEREF(__pyx_v_bytesitem);
- PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_bytesitem);
- __pyx_t_6 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 495, __pyx_L3_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- }
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_v_result = __pyx_t_1;
- __pyx_t_1 = 0;
-
- /* "View.MemoryView":494
- *
- * bytesitem = itemp[:self.view.itemsize]
- * try: # <<<<<<<<<<<<<<
- * result = struct.unpack(self.view.format, bytesitem)
- * except struct.error:
- */
- }
-
- /* "View.MemoryView":499
- * raise ValueError("Unable to convert item to object")
- * else:
- * if len(self.view.format) == 1: # <<<<<<<<<<<<<<
- * return result[0]
- * return result
- */
- /*else:*/ {
- __pyx_t_10 = strlen(__pyx_v_self->view.format);
- __pyx_t_11 = ((__pyx_t_10 == 1) != 0);
- if (__pyx_t_11) {
-
- /* "View.MemoryView":500
- * else:
- * if len(self.view.format) == 1:
- * return result[0] # <<<<<<<<<<<<<<
- * return result
- *
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 500, __pyx_L5_except_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L6_except_return;
-
- /* "View.MemoryView":499
- * raise ValueError("Unable to convert item to object")
- * else:
- * if len(self.view.format) == 1: # <<<<<<<<<<<<<<
- * return result[0]
- * return result
- */
- }
-
- /* "View.MemoryView":501
- * if len(self.view.format) == 1:
- * return result[0]
- * return result # <<<<<<<<<<<<<<
- *
- * cdef assign_item_from_object(self, char *itemp, object value):
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(__pyx_v_result);
- __pyx_r = __pyx_v_result;
- goto __pyx_L6_except_return;
- }
- __pyx_L3_error:;
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
-
- /* "View.MemoryView":496
- * try:
- * result = struct.unpack(self.view.format, bytesitem)
- * except struct.error: # <<<<<<<<<<<<<<
- * raise ValueError("Unable to convert item to object")
- * else:
- */
- __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_9);
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 496, __pyx_L5_except_error)
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_6);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_ErrRestore(__pyx_t_1, __pyx_t_5, __pyx_t_9);
- __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_9 = 0;
- if (__pyx_t_8) {
- __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(1, 496, __pyx_L5_except_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_GOTREF(__pyx_t_1);
-
- /* "View.MemoryView":497
- * result = struct.unpack(self.view.format, bytesitem)
- * except struct.error:
- * raise ValueError("Unable to convert item to object") # <<<<<<<<<<<<<<
- * else:
- * if len(self.view.format) == 1:
- */
- __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 497, __pyx_L5_except_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_Raise(__pyx_t_6, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __PYX_ERR(1, 497, __pyx_L5_except_error)
- }
- goto __pyx_L5_except_error;
- __pyx_L5_except_error:;
-
- /* "View.MemoryView":494
- *
- * bytesitem = itemp[:self.view.itemsize]
- * try: # <<<<<<<<<<<<<<
- * result = struct.unpack(self.view.format, bytesitem)
- * except struct.error:
- */
- __Pyx_XGIVEREF(__pyx_t_2);
- __Pyx_XGIVEREF(__pyx_t_3);
- __Pyx_XGIVEREF(__pyx_t_4);
- __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
- goto __pyx_L1_error;
- __pyx_L6_except_return:;
- __Pyx_XGIVEREF(__pyx_t_2);
- __Pyx_XGIVEREF(__pyx_t_3);
- __Pyx_XGIVEREF(__pyx_t_4);
- __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
- goto __pyx_L0;
- }
-
- /* "View.MemoryView":487
- * self.assign_item_from_object(itemp, value)
- *
- * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
- * """Only used if instantiated manually by the user, or if Cython doesn't
- * know how to convert the type"""
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_5);
- __Pyx_XDECREF(__pyx_t_6);
- __Pyx_XDECREF(__pyx_t_7);
- __Pyx_XDECREF(__pyx_t_9);
- __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = 0;
- __pyx_L0:;
- __Pyx_XDECREF(__pyx_v_struct);
- __Pyx_XDECREF(__pyx_v_bytesitem);
- __Pyx_XDECREF(__pyx_v_result);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":503
- * return result
- *
- * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
- * """Only used if instantiated manually by the user, or if Cython doesn't
- * know how to convert the type"""
- */
-
-static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
- PyObject *__pyx_v_struct = NULL;
- char __pyx_v_c;
- PyObject *__pyx_v_bytesvalue = 0;
- Py_ssize_t __pyx_v_i;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_t_2;
- int __pyx_t_3;
- PyObject *__pyx_t_4 = NULL;
- PyObject *__pyx_t_5 = NULL;
- PyObject *__pyx_t_6 = NULL;
- int __pyx_t_7;
- PyObject *__pyx_t_8 = NULL;
- Py_ssize_t __pyx_t_9;
- PyObject *__pyx_t_10 = NULL;
- char *__pyx_t_11;
- char *__pyx_t_12;
- char *__pyx_t_13;
- char *__pyx_t_14;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("assign_item_from_object", 0);
-
- /* "View.MemoryView":506
- * """Only used if instantiated manually by the user, or if Cython doesn't
- * know how to convert the type"""
- * import struct # <<<<<<<<<<<<<<
- * cdef char c
- * cdef bytes bytesvalue
- */
- __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 506, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_v_struct = __pyx_t_1;
- __pyx_t_1 = 0;
-
- /* "View.MemoryView":511
- * cdef Py_ssize_t i
- *
- * if isinstance(value, tuple): # <<<<<<<<<<<<<<
- * bytesvalue = struct.pack(self.view.format, *value)
- * else:
- */
- __pyx_t_2 = PyTuple_Check(__pyx_v_value);
- __pyx_t_3 = (__pyx_t_2 != 0);
- if (__pyx_t_3) {
-
- /* "View.MemoryView":512
- *
- * if isinstance(value, tuple):
- * bytesvalue = struct.pack(self.view.format, *value) # <<<<<<<<<<<<<<
- * else:
- * bytesvalue = struct.pack(self.view.format, value)
- */
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 512, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 512, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 512, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 512, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 512, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 512, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(1, 512, __pyx_L1_error)
- __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
- __pyx_t_4 = 0;
-
- /* "View.MemoryView":511
- * cdef Py_ssize_t i
- *
- * if isinstance(value, tuple): # <<<<<<<<<<<<<<
- * bytesvalue = struct.pack(self.view.format, *value)
- * else:
- */
- goto __pyx_L3;
- }
-
- /* "View.MemoryView":514
- * bytesvalue = struct.pack(self.view.format, *value)
- * else:
- * bytesvalue = struct.pack(self.view.format, value) # <<<<<<<<<<<<<<
- *
- * for i, c in enumerate(bytesvalue):
- */
- /*else*/ {
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 514, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 514, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = NULL;
- __pyx_t_7 = 0;
- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
- if (likely(__pyx_t_5)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
- __Pyx_INCREF(__pyx_t_5);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_6, function);
- __pyx_t_7 = 1;
- }
- }
- #if CYTHON_FAST_PYCALL
- if (PyFunction_Check(__pyx_t_6)) {
- PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
- __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 514, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- } else
- #endif
- #if CYTHON_FAST_PYCCALL
- if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
- PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
- __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 514, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- } else
- #endif
- {
- __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 514, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- if (__pyx_t_5) {
- __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
- }
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_1);
- __Pyx_INCREF(__pyx_v_value);
- __Pyx_GIVEREF(__pyx_v_value);
- PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_value);
- __pyx_t_1 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 514, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- }
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(1, 514, __pyx_L1_error)
- __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
- __pyx_t_4 = 0;
- }
- __pyx_L3:;
-
- /* "View.MemoryView":516
- * bytesvalue = struct.pack(self.view.format, value)
- *
- * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<<
- * itemp[i] = c
- *
- */
- __pyx_t_9 = 0;
- if (unlikely(__pyx_v_bytesvalue == Py_None)) {
- PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
- __PYX_ERR(1, 516, __pyx_L1_error)
- }
- __Pyx_INCREF(__pyx_v_bytesvalue);
- __pyx_t_10 = __pyx_v_bytesvalue;
- __pyx_t_12 = PyBytes_AS_STRING(__pyx_t_10);
- __pyx_t_13 = (__pyx_t_12 + PyBytes_GET_SIZE(__pyx_t_10));
- for (__pyx_t_14 = __pyx_t_12; __pyx_t_14 < __pyx_t_13; __pyx_t_14++) {
- __pyx_t_11 = __pyx_t_14;
- __pyx_v_c = (__pyx_t_11[0]);
-
- /* "View.MemoryView":517
- *
- * for i, c in enumerate(bytesvalue):
- * itemp[i] = c # <<<<<<<<<<<<<<
- *
- * @cname('getbuffer')
- */
- __pyx_v_i = __pyx_t_9;
-
- /* "View.MemoryView":516
- * bytesvalue = struct.pack(self.view.format, value)
- *
- * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<<
- * itemp[i] = c
- *
- */
- __pyx_t_9 = (__pyx_t_9 + 1);
-
- /* "View.MemoryView":517
- *
- * for i, c in enumerate(bytesvalue):
- * itemp[i] = c # <<<<<<<<<<<<<<
- *
- * @cname('getbuffer')
- */
- (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c;
- }
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-
- /* "View.MemoryView":503
- * return result
- *
- * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
- * """Only used if instantiated manually by the user, or if Cython doesn't
- * know how to convert the type"""
- */
-
- /* function exit code */
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5);
- __Pyx_XDECREF(__pyx_t_6);
- __Pyx_XDECREF(__pyx_t_8);
- __Pyx_XDECREF(__pyx_t_10);
- __Pyx_AddTraceback("View.MemoryView.memoryview.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = 0;
- __pyx_L0:;
- __Pyx_XDECREF(__pyx_v_struct);
- __Pyx_XDECREF(__pyx_v_bytesvalue);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":520
- *
- * @cname('getbuffer')
- * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
- * if flags & PyBUF_WRITABLE and self.view.readonly:
- * raise ValueError("Cannot create writable memory view from read-only memoryview")
- */
-
-/* Python wrapper */
-static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
-static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
- int __pyx_r;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
- __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
- int __pyx_r;
- __Pyx_RefNannyDeclarations
- int __pyx_t_1;
- int __pyx_t_2;
- PyObject *__pyx_t_3 = NULL;
- Py_ssize_t *__pyx_t_4;
- char *__pyx_t_5;
- void *__pyx_t_6;
- int __pyx_t_7;
- Py_ssize_t __pyx_t_8;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- if (__pyx_v_info == NULL) {
- PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
- return -1;
- }
- __Pyx_RefNannySetupContext("__getbuffer__", 0);
- __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
- __Pyx_GIVEREF(__pyx_v_info->obj);
-
- /* "View.MemoryView":521
- * @cname('getbuffer')
- * def __getbuffer__(self, Py_buffer *info, int flags):
- * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<<
- * raise ValueError("Cannot create writable memory view from read-only memoryview")
- *
- */
- __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0);
- if (__pyx_t_2) {
- } else {
- __pyx_t_1 = __pyx_t_2;
- goto __pyx_L4_bool_binop_done;
- }
- __pyx_t_2 = (__pyx_v_self->view.readonly != 0);
- __pyx_t_1 = __pyx_t_2;
- __pyx_L4_bool_binop_done:;
- if (unlikely(__pyx_t_1)) {
-
- /* "View.MemoryView":522
- * def __getbuffer__(self, Py_buffer *info, int flags):
- * if flags & PyBUF_WRITABLE and self.view.readonly:
- * raise ValueError("Cannot create writable memory view from read-only memoryview") # <<<<<<<<<<<<<<
- *
- * if flags & PyBUF_ND:
- */
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 522, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(1, 522, __pyx_L1_error)
-
- /* "View.MemoryView":521
- * @cname('getbuffer')
- * def __getbuffer__(self, Py_buffer *info, int flags):
- * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<<
- * raise ValueError("Cannot create writable memory view from read-only memoryview")
- *
- */
- }
-
- /* "View.MemoryView":524
- * raise ValueError("Cannot create writable memory view from read-only memoryview")
- *
- * if flags & PyBUF_ND: # <<<<<<<<<<<<<<
- * info.shape = self.view.shape
- * else:
- */
- __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
- if (__pyx_t_1) {
-
- /* "View.MemoryView":525
- *
- * if flags & PyBUF_ND:
- * info.shape = self.view.shape # <<<<<<<<<<<<<<
- * else:
- * info.shape = NULL
- */
- __pyx_t_4 = __pyx_v_self->view.shape;
- __pyx_v_info->shape = __pyx_t_4;
-
- /* "View.MemoryView":524
- * raise ValueError("Cannot create writable memory view from read-only memoryview")
- *
- * if flags & PyBUF_ND: # <<<<<<<<<<<<<<
- * info.shape = self.view.shape
- * else:
- */
- goto __pyx_L6;
- }
-
- /* "View.MemoryView":527
- * info.shape = self.view.shape
- * else:
- * info.shape = NULL # <<<<<<<<<<<<<<
- *
- * if flags & PyBUF_STRIDES:
- */
- /*else*/ {
- __pyx_v_info->shape = NULL;
- }
- __pyx_L6:;
-
- /* "View.MemoryView":529
- * info.shape = NULL
- *
- * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<<
- * info.strides = self.view.strides
- * else:
- */
- __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
- if (__pyx_t_1) {
-
- /* "View.MemoryView":530
- *
- * if flags & PyBUF_STRIDES:
- * info.strides = self.view.strides # <<<<<<<<<<<<<<
- * else:
- * info.strides = NULL
- */
- __pyx_t_4 = __pyx_v_self->view.strides;
- __pyx_v_info->strides = __pyx_t_4;
-
- /* "View.MemoryView":529
- * info.shape = NULL
- *
- * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<<
- * info.strides = self.view.strides
- * else:
- */
- goto __pyx_L7;
- }
-
- /* "View.MemoryView":532
- * info.strides = self.view.strides
- * else:
- * info.strides = NULL # <<<<<<<<<<<<<<
- *
- * if flags & PyBUF_INDIRECT:
- */
- /*else*/ {
- __pyx_v_info->strides = NULL;
- }
- __pyx_L7:;
-
- /* "View.MemoryView":534
- * info.strides = NULL
- *
- * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<<
- * info.suboffsets = self.view.suboffsets
- * else:
- */
- __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0);
- if (__pyx_t_1) {
-
- /* "View.MemoryView":535
- *
- * if flags & PyBUF_INDIRECT:
- * info.suboffsets = self.view.suboffsets # <<<<<<<<<<<<<<
- * else:
- * info.suboffsets = NULL
- */
- __pyx_t_4 = __pyx_v_self->view.suboffsets;
- __pyx_v_info->suboffsets = __pyx_t_4;
-
- /* "View.MemoryView":534
- * info.strides = NULL
- *
- * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<<
- * info.suboffsets = self.view.suboffsets
- * else:
- */
- goto __pyx_L8;
- }
-
- /* "View.MemoryView":537
- * info.suboffsets = self.view.suboffsets
- * else:
- * info.suboffsets = NULL # <<<<<<<<<<<<<<
- *
- * if flags & PyBUF_FORMAT:
- */
- /*else*/ {
- __pyx_v_info->suboffsets = NULL;
- }
- __pyx_L8:;
-
- /* "View.MemoryView":539
- * info.suboffsets = NULL
- *
- * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
- * info.format = self.view.format
- * else:
- */
- __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
- if (__pyx_t_1) {
-
- /* "View.MemoryView":540
- *
- * if flags & PyBUF_FORMAT:
- * info.format = self.view.format # <<<<<<<<<<<<<<
- * else:
- * info.format = NULL
- */
- __pyx_t_5 = __pyx_v_self->view.format;
- __pyx_v_info->format = __pyx_t_5;
-
- /* "View.MemoryView":539
- * info.suboffsets = NULL
- *
- * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
- * info.format = self.view.format
- * else:
- */
- goto __pyx_L9;
- }
-
- /* "View.MemoryView":542
- * info.format = self.view.format
- * else:
- * info.format = NULL # <<<<<<<<<<<<<<
- *
- * info.buf = self.view.buf
- */
- /*else*/ {
- __pyx_v_info->format = NULL;
- }
- __pyx_L9:;
-
- /* "View.MemoryView":544
- * info.format = NULL
- *
- * info.buf = self.view.buf # <<<<<<<<<<<<<<
- * info.ndim = self.view.ndim
- * info.itemsize = self.view.itemsize
- */
- __pyx_t_6 = __pyx_v_self->view.buf;
- __pyx_v_info->buf = __pyx_t_6;
-
- /* "View.MemoryView":545
- *
- * info.buf = self.view.buf
- * info.ndim = self.view.ndim # <<<<<<<<<<<<<<
- * info.itemsize = self.view.itemsize
- * info.len = self.view.len
- */
- __pyx_t_7 = __pyx_v_self->view.ndim;
- __pyx_v_info->ndim = __pyx_t_7;
-
- /* "View.MemoryView":546
- * info.buf = self.view.buf
- * info.ndim = self.view.ndim
- * info.itemsize = self.view.itemsize # <<<<<<<<<<<<<<
- * info.len = self.view.len
- * info.readonly = self.view.readonly
- */
- __pyx_t_8 = __pyx_v_self->view.itemsize;
- __pyx_v_info->itemsize = __pyx_t_8;
-
- /* "View.MemoryView":547
- * info.ndim = self.view.ndim
- * info.itemsize = self.view.itemsize
- * info.len = self.view.len # <<<<<<<<<<<<<<
- * info.readonly = self.view.readonly
- * info.obj = self
- */
- __pyx_t_8 = __pyx_v_self->view.len;
- __pyx_v_info->len = __pyx_t_8;
-
- /* "View.MemoryView":548
- * info.itemsize = self.view.itemsize
- * info.len = self.view.len
- * info.readonly = self.view.readonly # <<<<<<<<<<<<<<
- * info.obj = self
- *
- */
- __pyx_t_1 = __pyx_v_self->view.readonly;
- __pyx_v_info->readonly = __pyx_t_1;
-
- /* "View.MemoryView":549
- * info.len = self.view.len
- * info.readonly = self.view.readonly
- * info.obj = self # <<<<<<<<<<<<<<
- *
- * __pyx_getbuffer = capsule( &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")
- */
- __Pyx_INCREF(((PyObject *)__pyx_v_self));
- __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
- __Pyx_GOTREF(__pyx_v_info->obj);
- __Pyx_DECREF(__pyx_v_info->obj);
- __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
-
- /* "View.MemoryView":520
- *
- * @cname('getbuffer')
- * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
- * if flags & PyBUF_WRITABLE and self.view.readonly:
- * raise ValueError("Cannot create writable memory view from read-only memoryview")
- */
-
- /* function exit code */
- __pyx_r = 0;
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = -1;
- if (__pyx_v_info->obj != NULL) {
- __Pyx_GOTREF(__pyx_v_info->obj);
- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
- }
- goto __pyx_L2;
- __pyx_L0:;
- if (__pyx_v_info->obj == Py_None) {
- __Pyx_GOTREF(__pyx_v_info->obj);
- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
- }
- __pyx_L2:;
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":555
- *
- * @property
- * def T(self): # <<<<<<<<<<<<<<
- * cdef _memoryviewslice result = memoryview_copy(self)
- * transpose_memslice(&result.from_slice)
- */
-
-/* Python wrapper */
-static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
- struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_t_2;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__get__", 0);
-
- /* "View.MemoryView":556
- * @property
- * def T(self):
- * cdef _memoryviewslice result = memoryview_copy(self) # <<<<<<<<<<<<<<
- * transpose_memslice(&result.from_slice)
- * return result
- */
- __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 556, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type))))) __PYX_ERR(1, 556, __pyx_L1_error)
- __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1);
- __pyx_t_1 = 0;
-
- /* "View.MemoryView":557
- * def T(self):
- * cdef _memoryviewslice result = memoryview_copy(self)
- * transpose_memslice(&result.from_slice) # <<<<<<<<<<<<<<
- * return result
- *
- */
- __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 557, __pyx_L1_error)
-
- /* "View.MemoryView":558
- * cdef _memoryviewslice result = memoryview_copy(self)
- * transpose_memslice(&result.from_slice)
- * return result # <<<<<<<<<<<<<<
- *
- * @property
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(((PyObject *)__pyx_v_result));
- __pyx_r = ((PyObject *)__pyx_v_result);
- goto __pyx_L0;
-
- /* "View.MemoryView":555
- *
- * @property
- * def T(self): # <<<<<<<<<<<<<<
- * cdef _memoryviewslice result = memoryview_copy(self)
- * transpose_memslice(&result.from_slice)
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("View.MemoryView.memoryview.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XDECREF((PyObject *)__pyx_v_result);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":561
- *
- * @property
- * def base(self): # <<<<<<<<<<<<<<
- * return self.obj
- *
- */
-
-/* Python wrapper */
-static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__get__", 0);
-
- /* "View.MemoryView":562
- * @property
- * def base(self):
- * return self.obj # <<<<<<<<<<<<<<
- *
- * @property
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(__pyx_v_self->obj);
- __pyx_r = __pyx_v_self->obj;
- goto __pyx_L0;
-
- /* "View.MemoryView":561
- *
- * @property
- * def base(self): # <<<<<<<<<<<<<<
- * return self.obj
- *
- */
-
- /* function exit code */
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":565
- *
- * @property
- * def shape(self): # <<<<<<<<<<<<<<
- * return tuple([length for length in self.view.shape[:self.view.ndim]])
- *
- */
-
-/* Python wrapper */
-static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
- Py_ssize_t __pyx_v_length;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- Py_ssize_t *__pyx_t_2;
- Py_ssize_t *__pyx_t_3;
- Py_ssize_t *__pyx_t_4;
- PyObject *__pyx_t_5 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__get__", 0);
-
- /* "View.MemoryView":566
- * @property
- * def shape(self):
- * return tuple([length for length in self.view.shape[:self.view.ndim]]) # <<<<<<<<<<<<<<
- *
- * @property
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 566, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
- for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
- __pyx_t_2 = __pyx_t_4;
- __pyx_v_length = (__pyx_t_2[0]);
- __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 566, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 566, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- }
- __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 566, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_r = __pyx_t_5;
- __pyx_t_5 = 0;
- goto __pyx_L0;
-
- /* "View.MemoryView":565
- *
- * @property
- * def shape(self): # <<<<<<<<<<<<<<
- * return tuple([length for length in self.view.shape[:self.view.ndim]])
- *
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_5);
- __Pyx_AddTraceback("View.MemoryView.memoryview.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":569
- *
- * @property
- * def strides(self): # <<<<<<<<<<<<<<
- * if self.view.strides == NULL:
- *
- */
-
-/* Python wrapper */
-static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
- Py_ssize_t __pyx_v_stride;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- int __pyx_t_1;
- PyObject *__pyx_t_2 = NULL;
- Py_ssize_t *__pyx_t_3;
- Py_ssize_t *__pyx_t_4;
- Py_ssize_t *__pyx_t_5;
- PyObject *__pyx_t_6 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__get__", 0);
-
- /* "View.MemoryView":570
- * @property
- * def strides(self):
- * if self.view.strides == NULL: # <<<<<<<<<<<<<<
- *
- * raise ValueError("Buffer view does not expose strides")
- */
- __pyx_t_1 = ((__pyx_v_self->view.strides == NULL) != 0);
- if (unlikely(__pyx_t_1)) {
-
- /* "View.MemoryView":572
- * if self.view.strides == NULL:
- *
- * raise ValueError("Buffer view does not expose strides") # <<<<<<<<<<<<<<
- *
- * return tuple([stride for stride in self.view.strides[:self.view.ndim]])
- */
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 572, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_Raise(__pyx_t_2, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(1, 572, __pyx_L1_error)
-
- /* "View.MemoryView":570
- * @property
- * def strides(self):
- * if self.view.strides == NULL: # <<<<<<<<<<<<<<
- *
- * raise ValueError("Buffer view does not expose strides")
- */
- }
-
- /* "View.MemoryView":574
- * raise ValueError("Buffer view does not expose strides")
- *
- * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) # <<<<<<<<<<<<<<
- *
- * @property
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 574, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim);
- for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
- __pyx_t_3 = __pyx_t_5;
- __pyx_v_stride = (__pyx_t_3[0]);
- __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 574, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 574, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- }
- __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 574, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_r = __pyx_t_6;
- __pyx_t_6 = 0;
- goto __pyx_L0;
-
- /* "View.MemoryView":569
- *
- * @property
- * def strides(self): # <<<<<<<<<<<<<<
- * if self.view.strides == NULL:
- *
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_6);
- __Pyx_AddTraceback("View.MemoryView.memoryview.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":577
- *
- * @property
- * def suboffsets(self): # <<<<<<<<<<<<<<
- * if self.view.suboffsets == NULL:
- * return (-1,) * self.view.ndim
- */
-
-/* Python wrapper */
-static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
- Py_ssize_t __pyx_v_suboffset;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- int __pyx_t_1;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
- Py_ssize_t *__pyx_t_4;
- Py_ssize_t *__pyx_t_5;
- Py_ssize_t *__pyx_t_6;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__get__", 0);
-
- /* "View.MemoryView":578
- * @property
- * def suboffsets(self):
- * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<<
- * return (-1,) * self.view.ndim
- *
- */
- __pyx_t_1 = ((__pyx_v_self->view.suboffsets == NULL) != 0);
- if (__pyx_t_1) {
-
- /* "View.MemoryView":579
- * def suboffsets(self):
- * if self.view.suboffsets == NULL:
- * return (-1,) * self.view.ndim # <<<<<<<<<<<<<<
- *
- * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 579, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyNumber_Multiply(__pyx_tuple__13, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 579, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_r = __pyx_t_3;
- __pyx_t_3 = 0;
- goto __pyx_L0;
-
- /* "View.MemoryView":578
- * @property
- * def suboffsets(self):
- * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<<
- * return (-1,) * self.view.ndim
- *
- */
- }
-
- /* "View.MemoryView":581
- * return (-1,) * self.view.ndim
- *
- * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) # <<<<<<<<<<<<<<
- *
- * @property
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 581, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_5 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim);
- for (__pyx_t_6 = __pyx_v_self->view.suboffsets; __pyx_t_6 < __pyx_t_5; __pyx_t_6++) {
- __pyx_t_4 = __pyx_t_6;
- __pyx_v_suboffset = (__pyx_t_4[0]);
- __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_suboffset); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 581, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(1, 581, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- }
- __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 581, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_r = __pyx_t_2;
- __pyx_t_2 = 0;
- goto __pyx_L0;
-
- /* "View.MemoryView":577
- *
- * @property
- * def suboffsets(self): # <<<<<<<<<<<<<<
- * if self.view.suboffsets == NULL:
- * return (-1,) * self.view.ndim
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("View.MemoryView.memoryview.suboffsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":584
- *
- * @property
- * def ndim(self): # <<<<<<<<<<<<<<
- * return self.view.ndim
- *
- */
-
-/* Python wrapper */
-static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__get__", 0);
-
- /* "View.MemoryView":585
- * @property
- * def ndim(self):
- * return self.view.ndim # <<<<<<<<<<<<<<
- *
- * @property
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 585, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
- /* "View.MemoryView":584
- *
- * @property
- * def ndim(self): # <<<<<<<<<<<<<<
- * return self.view.ndim
- *
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":588
- *
- * @property
- * def itemsize(self): # <<<<<<<<<<<<<<
- * return self.view.itemsize
- *
- */
-
-/* Python wrapper */
-static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__get__", 0);
-
- /* "View.MemoryView":589
- * @property
- * def itemsize(self):
- * return self.view.itemsize # <<<<<<<<<<<<<<
- *
- * @property
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 589, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
- /* "View.MemoryView":588
- *
- * @property
- * def itemsize(self): # <<<<<<<<<<<<<<
- * return self.view.itemsize
- *
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":592
- *
- * @property
- * def nbytes(self): # <<<<<<<<<<<<<<
- * return self.size * self.view.itemsize
- *
- */
-
-/* Python wrapper */
-static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__get__", 0);
-
- /* "View.MemoryView":593
- * @property
- * def nbytes(self):
- * return self.size * self.view.itemsize # <<<<<<<<<<<<<<
- *
- * @property
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 593, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 593, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 593, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_r = __pyx_t_3;
- __pyx_t_3 = 0;
- goto __pyx_L0;
-
- /* "View.MemoryView":592
- *
- * @property
- * def nbytes(self): # <<<<<<<<<<<<<<
- * return self.size * self.view.itemsize
- *
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("View.MemoryView.memoryview.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":596
- *
- * @property
- * def size(self): # <<<<<<<<<<<<<<
- * if self._size is None:
- * result = 1
- */
-
-/* Python wrapper */
-static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
- PyObject *__pyx_v_result = NULL;
- PyObject *__pyx_v_length = NULL;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- int __pyx_t_1;
- int __pyx_t_2;
- Py_ssize_t *__pyx_t_3;
- Py_ssize_t *__pyx_t_4;
- Py_ssize_t *__pyx_t_5;
- PyObject *__pyx_t_6 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__get__", 0);
-
- /* "View.MemoryView":597
- * @property
- * def size(self):
- * if self._size is None: # <<<<<<<<<<<<<<
- * result = 1
- *
- */
- __pyx_t_1 = (__pyx_v_self->_size == Py_None);
- __pyx_t_2 = (__pyx_t_1 != 0);
- if (__pyx_t_2) {
-
- /* "View.MemoryView":598
- * def size(self):
- * if self._size is None:
- * result = 1 # <<<<<<<<<<<<<<
- *
- * for length in self.view.shape[:self.view.ndim]:
- */
- __Pyx_INCREF(__pyx_int_1);
- __pyx_v_result = __pyx_int_1;
-
- /* "View.MemoryView":600
- * result = 1
- *
- * for length in self.view.shape[:self.view.ndim]: # <<<<<<<<<<<<<<
- * result *= length
- *
- */
- __pyx_t_4 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
- for (__pyx_t_5 = __pyx_v_self->view.shape; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
- __pyx_t_3 = __pyx_t_5;
- __pyx_t_6 = PyInt_FromSsize_t((__pyx_t_3[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 600, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_6);
- __pyx_t_6 = 0;
-
- /* "View.MemoryView":601
- *
- * for length in self.view.shape[:self.view.ndim]:
- * result *= length # <<<<<<<<<<<<<<
- *
- * self._size = result
- */
- __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 601, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6);
- __pyx_t_6 = 0;
- }
-
- /* "View.MemoryView":603
- * result *= length
- *
- * self._size = result # <<<<<<<<<<<<<<
- *
- * return self._size
- */
- __Pyx_INCREF(__pyx_v_result);
- __Pyx_GIVEREF(__pyx_v_result);
- __Pyx_GOTREF(__pyx_v_self->_size);
- __Pyx_DECREF(__pyx_v_self->_size);
- __pyx_v_self->_size = __pyx_v_result;
-
- /* "View.MemoryView":597
- * @property
- * def size(self):
- * if self._size is None: # <<<<<<<<<<<<<<
- * result = 1
- *
- */
- }
-
- /* "View.MemoryView":605
- * self._size = result
- *
- * return self._size # <<<<<<<<<<<<<<
- *
- * def __len__(self):
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(__pyx_v_self->_size);
- __pyx_r = __pyx_v_self->_size;
- goto __pyx_L0;
-
- /* "View.MemoryView":596
- *
- * @property
- * def size(self): # <<<<<<<<<<<<<<
- * if self._size is None:
- * result = 1
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_6);
- __Pyx_AddTraceback("View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XDECREF(__pyx_v_result);
- __Pyx_XDECREF(__pyx_v_length);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":607
- * return self._size
- *
- * def __len__(self): # <<<<<<<<<<<<<<
- * if self.view.ndim >= 1:
- * return self.view.shape[0]
- */
-
-/* Python wrapper */
-static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/
-static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) {
- Py_ssize_t __pyx_r;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
- __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) {
- Py_ssize_t __pyx_r;
- __Pyx_RefNannyDeclarations
- int __pyx_t_1;
- __Pyx_RefNannySetupContext("__len__", 0);
-
- /* "View.MemoryView":608
- *
- * def __len__(self):
- * if self.view.ndim >= 1: # <<<<<<<<<<<<<<
- * return self.view.shape[0]
- *
- */
- __pyx_t_1 = ((__pyx_v_self->view.ndim >= 1) != 0);
- if (__pyx_t_1) {
-
- /* "View.MemoryView":609
- * def __len__(self):
- * if self.view.ndim >= 1:
- * return self.view.shape[0] # <<<<<<<<<<<<<<
- *
- * return 0
- */
- __pyx_r = (__pyx_v_self->view.shape[0]);
- goto __pyx_L0;
-
- /* "View.MemoryView":608
- *
- * def __len__(self):
- * if self.view.ndim >= 1: # <<<<<<<<<<<<<<
- * return self.view.shape[0]
- *
- */
- }
-
- /* "View.MemoryView":611
- * return self.view.shape[0]
- *
- * return 0 # <<<<<<<<<<<<<<
- *
- * def __repr__(self):
- */
- __pyx_r = 0;
- goto __pyx_L0;
-
- /* "View.MemoryView":607
- * return self._size
- *
- * def __len__(self): # <<<<<<<<<<<<<<
- * if self.view.ndim >= 1:
- * return self.view.shape[0]
- */
-
- /* function exit code */
- __pyx_L0:;
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "View.MemoryView":613
- * return 0
- *
- * def __repr__(self): # <<<<<<<<<<<<<<
- * return "" % (self.base.__class__.__name__,
- * id(self))
- */
-
-/* Python wrapper */
-static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
- __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__repr__", 0);
-
- /* "View.MemoryView":614
- *
- * def __repr__(self):
- * return "" % (self.base.__class__.__name__, # <<<<<<<<<<<<<<
- * id(self))
- *
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 614, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 614, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 614, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
- /* "View.MemoryView":615
- * def __repr__(self):
- * return "" % (self.base.__class__.__name__,
- * id(self)) # <<<<<<<<<<<<<<
- *
- * def __str__(self):
- */
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 615, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-
- /* "View.MemoryView":614
- *
- * def __repr__(self):
- * return "" % (self.base.__class__.__name__, # <<<<<<<<<<<<<<
- * id(self))
- *
- */
- __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 614, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
- __pyx_t_1 = 0;
- __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 614, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_r = __pyx_t_2;
- __pyx_t_2 = 0;
- goto __pyx_L0;
-
- /* "View.MemoryView":613
- * return 0
- *
- * def __repr__(self): # <<<<<<<<<<<<<<
- * return "