VectorField not properly instantiated?
- Langage dominant
- Python
- Étoiles
- 11.2k
- Forks
- 2.1k
- Merge moyen
- 5 h 49 min
- PR mergées (30 j)
- 3
Description
In [_2024/holograms/diffraction.py](https://github.com/3b1b/videos/blob/master/_2024/holograms/diffraction.py), there is an instance of VectorField that is missing the coordinate_system argument on line 400:
```
linear_field = VectorField(field_func, sample_points=wave_line.get_points()[::4], max_vect_len=2.0)
```
Is this an error or is the code supposed to run normally?
Error message:
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[3], line 7
4 result[:, 1] = wave_amp_tracker.get_value() * wave.wave_func(points)
5 return result
----> 7 linear_field = VectorField(field_func, sample_points=wave_line.get_points()[::4], max_vect_len=2.0)
wave_line =
8 linear_field.always.update_vectors()
9 linear_field.set_stroke(WHITE, width=1.5, opacity=0.75)
TypeError: VectorField.__init__() missing 1 required positional argument: 'coordinate_system'
```
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Regarde la définition de la classe VectorField dans la bibliothèque manim pour voir sa signature __init__. L’erreur indique un argument 'coordinate_system' manquant. Vérifie comment VectorField est instancié ailleurs dans la base de code pour une utilisation correcte. Mets à jour la ligne 400 dans _2024/holograms/diffraction.py pour inclure l’argument requis, puis exécute le script pour vérifier le correctif.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Domaine
- tooling
- Type d'issue
- Bug
- Difficulté
- 1/5
- Temps estimé
- Moins d'une heure
- Activité
- À l'abandon
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 75/100