astropy / astropy/astropy

astropy/docs/wcs/examples/from_file.py needs updating

Open
#5,285 1 comment 0 reactions 0 assignees View on GitHub
Docs wcs
Dominant language
Python
Stars
5.3k
Forks
2.2k
Avg merge
1d 18h
Merged PRs (30d)
74

Description

Hi,
running the example in `astropy/docs/wcs/examples/from_file.py` throws me an value error:

```
ValueError: When providing two arguments, the array must be of shape (N, 3)
```

on line 25. Changing the line from:

``` python
pixcrd = numpy.array([[0, 0], [24, 38], [45, 98]], numpy.float_)
```

->

``` python
pixcrd = numpy.array([[0, 24, 45], [0, 38, 98]], numpy.float_)
```

solves the problem.

EDIT: Fixed formatting.

Contributor guide

Open the contributing guide

Research direction

Open astropy/docs/wcs/examples/from_file.py and inspect line 25, then run the example to reproduce the ValueError. Update the pixel-coordinate array as described in the issue and rerun the example; done means it executes without the reported shape error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.